Class: CreateUserRoles
- Inherits:
-
Object
- Object
- CreateUserRoles
- Defined in:
- lib/generators/install/templates/create_user_roles.rb
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
2 3 4 5 6 7 8 9 |
# File 'lib/generators/install/templates/create_user_roles.rb', line 2 def change create_table :user_roles do |t| t.references :role, index: true, foreign_key: {on_delete: :cascade} t.references :user, index: true, foreign_key: {on_delete: :cascade} t. end end |