Sha256: 133ed8a97679357c95487b91f8c1afdfc730fbca74a3ee885a8984d35cb0af34
Contents?: true
Size: 563 Bytes
Versions: 15
Compression:
Stored size: 563 Bytes
Contents
class RolifyCreateRoles < ActiveRecord::Migration def change create_table(:mtdevise_roles) do |t| t.string :name t.references :resource, :polymorphic => true t.timestamps end create_table(:mtdevise_users_mtdevise_roles, :id => false) do |t| t.references :user t.references :role end add_index(:mtdevise_roles, :name) add_index(:mtdevise_roles, [ :name, :resource_type, :resource_id ], name: 'index_mtdevise_roles_on_name_and_resource_type_and_resourc' ) add_index(:mtdevise_users_mtdevise_roles, [ :user_id, :role_id ]) end end
Version data entries
15 entries across 15 versions & 1 rubygems