Sha256: eecb8e1a0c9a07e2641b71886b1493a13c61cb79503ea92007c5953b924b47a5
Contents?: true
Size: 677 Bytes
Versions: 18
Compression:
Stored size: 677 Bytes
Contents
# frozen_string_literal: true class CreateG5AuthenticatableRoles < ActiveRecord::Migration[4.2] def change create_table(:g5_authenticatable_roles) do |t| t.string :name t.references :resource, :polymorphic => true t.timestamps end create_table(:g5_authenticatable_users_roles, :id => false) do |t| t.references :user t.references :role end add_index(:g5_authenticatable_roles, :name) add_index(:g5_authenticatable_roles, [ :name, :resource_type, :resource_id ], name: 'index_g5_authenticatable_roles_on_name_and_resource') add_index(:g5_authenticatable_users_roles, [ :user_id, :role_id ]) end end
Version data entries
18 entries across 18 versions & 1 rubygems