Class: AddNameToRoles
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- AddNameToRoles
- Defined in:
- lib/generators/association/templates/role_migration_existing.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
6 7 8 9 10 |
# File 'lib/generators/association/templates/role_migration_existing.rb', line 6 def self.down # By default, we don't want to make any assumption about how to roll back a migration when your # model already existed. Please edit below which fields you would like to remove in this migration. raise ActiveRecord::IrreversibleMigration end |
.up ⇒ Object
2 3 4 |
# File 'lib/generators/association/templates/role_migration_existing.rb', line 2 def self.up change_column :roles,:name,:string end |