Class: CreateWheelConfigs

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/wheel/install/templates/create_wheel_configs.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/generators/wheel/install/templates/create_wheel_configs.rb', line 2

def change
  create_table :wheel_configs do |t|
    t.string :key, null: false
    t.string :description
    t.string :value_type, null: false
    t.jsonb :default_value, null: false, default: {}
    t.jsonb :conditions, default: []
    t.boolean :enabled, default: true
    
    t.timestamps

    t.index :key, unique: true
    t.index :conditions, using: :gin
  end
end