Class: CreateFionaTables
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateFionaTables
- Defined in:
- lib/generators/fiona/templates/create_fiona_tables.rb
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/generators/fiona/templates/create_fiona_tables.rb', line 2 def change create_table :templates do |t| t.string :type t.string :key t.string :name t. end create_table :template_attributes do |t| t.integer :template_id t.string :key t.text :value t. end add_index :template_attributes, [:template_id, :key] end |