Sha256: ed16722f81e476427f0b198078e703f7b6e212bd0265385921ace4bfc771a34a
Contents?: true
Size: 536 Bytes
Versions: 64
Compression:
Stored size: 536 Bytes
Contents
# This migration comes from dm_core (originally 20121028153317) class RolifyCreateRoles < ActiveRecord::Migration def change create_table(:roles) do |t| t.string :name t.references :resource, :polymorphic => true t.timestamps null: true end create_table(:users_roles, :id => false) do |t| t.references :user t.references :role end add_index(:roles, :name) add_index(:roles, [ :name, :resource_type, :resource_id ]) add_index(:users_roles, [ :user_id, :role_id ]) end end
Version data entries
64 entries across 64 versions & 4 rubygems