class AddRules

Public Instance Methods

change() click to toggle source
# File lib/generators/rails_rbs/templates/rule_migration.rb, line 3
def change
  create_table :rules do |table|
    table.string :type, null: false
    table.string :enforced_type, null: false, default: :string
    table.string :enforced_value
    table.string :observed_field, null: false
    table.string :comparison_operator, null: false, default: '='
    table.integer :<%= options.owned_by