Class: CreateMultiRoleAssignments
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateMultiRoleAssignments
- Defined in:
- lib/generators/auth_assist/templates/remove_multi_role_assignments_migration.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/generators/auth_assist/templates/remove_multi_role_assignments_migration.rb', line 2 def self.down create_table :role_assignments do |t| t.integer :user_id t.integer :role_id t. end create_table :roles do |t| t.string :name t. end add_column :users, :role_assignment_id, :integer end |
.up ⇒ Object
18 19 20 21 22 |
# File 'lib/generators/auth_assist/templates/remove_multi_role_assignments_migration.rb', line 18 def self.up drop_table :role_assignments drop_table :roles remove_column :users, :role_assignment_id end |