Class: CreateHasEasyMigration
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateHasEasyMigration
- Defined in:
- lib/generators/has_easy_migration/templates/has_easy_migration.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
13 14 15 |
# File 'lib/generators/has_easy_migration/templates/has_easy_migration.rb', line 13 def self.down drop_table :has_easy_things end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 |
# File 'lib/generators/has_easy_migration/templates/has_easy_migration.rb', line 2 def self.up create_table :has_easy_things do |t| t.string :model_type, :null => false t.integer :model_id, :null => false t.string :context t.string :name, :null => false t.string :value t. end end |