Sha256: 5b1d76b7b409aeff8eacacad91b2d2482e2cea1c6166317eafffa0ae67886fbd
Contents?: true
Size: 400 Bytes
Versions: 98
Compression:
Stored size: 400 Bytes
Contents
class UsersHaveAndBelongToManyRoles < ActiveRecord::Migration[4.2] # rubocop:disable Rails/CreateTableWithTimestamps def change create_table :roles_users, id: false do |t| t.references :role, :user end add_foreign_key :roles_users, :users, column: :user_id add_foreign_key :roles_users, :roles, column: :role_id end # rubocop:enable Rails/CreateTableWithTimestamps end
Version data entries
98 entries across 98 versions & 1 rubygems