Class: CreatePreferences
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreatePreferences
- Defined in:
- lib/generators/flavors/templates/create_preferences.rb
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/generators/flavors/templates/create_preferences.rb', line 2 def change create_table :preferences do |t| t.string :name t.boolean :value t.integer :prefered_id t.string :prefered_type t. end add_index :preferences, :prefered_id add_index :preferences, :prefered_type add_index :preferences, :name end |