Class: CreateActiveDynamicAttributesTable
- Inherits:
-
Object
- Object
- CreateActiveDynamicAttributesTable
- Defined in:
- lib/active_dynamic/migration.rb
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/active_dynamic/migration.rb', line 3 def change create_table :active_dynamic_attributes do |t| t.integer :customizable_id, null: false t.string :customizable_type, limit: 50 t.string :name t.string :display_name, null: false t.integer :datatype t.text :value t.boolean :required, null: false, default: false t. end add_index :active_dynamic_attributes, :customizable_id add_index :active_dynamic_attributes, :customizable_type end |