Class: AddUsersRoles
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- AddUsersRoles
- Defined in:
- lib/generators/devise_wind/install/templates/add_users_roles.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
11 12 13 |
# File 'lib/generators/devise_wind/install/templates/add_users_roles.rb', line 11 def self.down drop_table :roles_users end |
.up ⇒ Object
2 3 4 5 6 7 8 9 |
# File 'lib/generators/devise_wind/install/templates/add_users_roles.rb', line 2 def self.up create_table :roles_users, :id => false do |t| t.column :user_id, :integer, :null => false t.column :role_id, :integer, :null => false end add_index :roles_users, :user_id, :unique => false add_index :roles_users, :role_id, :unique => false end |