Class: CreatePadlocks
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreatePadlocks
- Defined in:
- lib/generators/templates/migration.rb
Instance Method Summary collapse
Instance Method Details
#down ⇒ Object
12 13 14 |
# File 'lib/generators/templates/migration.rb', line 12 def down drop_table :padlocks end |
#up ⇒ Object
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. end end |