Class: CreateFieldTemplates

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/activeadmin-magicfields/install/templates/create_field_templates.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
12
13
# File 'lib/generators/activeadmin-magicfields/install/templates/create_field_templates.rb', line 2

def change
  create_table :field_templates do |t|
    t.string :title
    t.boolean :is_required
    t.string :field_type
    t.references :part, index: true

    t.integer :position

    t.timestamps
  end
end