Class: AddGroupActionToModulePermission
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- AddGroupActionToModulePermission
- Defined in:
- lib/generators/permission/templates/module_permission_migration_existing.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
8 9 10 11 12 |
# File 'lib/generators/permission/templates/module_permission_migration_existing.rb', line 8 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 5 6 |
# File 'lib/generators/permission/templates/module_permission_migration_existing.rb', line 2 def self.up change_column :module_permissions,:module_group_id,:integer,index: true change_column :module_permissions,:module_action_id,:integer,index: true change_column :module_permissions,:role_id,:integer,index: true end |