Class: CreateBlocks

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/templates/migrations/create_blocks.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
# File 'lib/generators/templates/migrations/create_blocks.rb', line 2

def change
  create_table :blocks do |t|
    t.references :blockable, polymorphic: true
    t.string :name
    t.string :handle
    t.integer :position
    t.boolean :visible, default: true
    t.timestamps
  end
end