Class: CreatePadlocks

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/templates/migration.rb

Instance Method Summary collapse

Instance Method Details

#downObject



12
13
14
# File 'lib/generators/templates/migration.rb', line 12

def down
  drop_table :padlocks
end

#upObject



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

def up
  create_table :padlocks do |t|
    t.integer :lockable_id
    t.string  :lockable_type
    t.integer :user_id

    t.timestamps
  end
end