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

Version Path
mtdevise-1.8.6 db/migrate/20150604101617_rolify_create_roles.rb
mtdevise-1.8.5 db/migrate/20150604101617_rolify_create_roles.rb
mtdevise-1.8.0 db/migrate/20150604101617_rolify_create_roles.rb
mtdevise-1.7.11 db/migrate/20150604101617_rolify_create_roles.rb
mtdevise-1.7.8 db/migrate/20150604101617_rolify_create_roles.rb
mtdevise-1.7.5 db/migrate/20150604101617_rolify_create_roles.rb
mtdevise-1.7.1 db/migrate/20150604101617_rolify_create_roles.rb
mtdevise-1.7.0 db/migrate/20150604101617_rolify_create_roles.rb
mtdevise-1.6.6 db/migrate/20150604101617_rolify_create_roles.rb
mtdevise-1.6.5 db/migrate/20150604101617_rolify_create_roles.rb
mtdevise-1.6.3 db/migrate/20150604101617_rolify_create_roles.rb
mtdevise-1.6.0 db/migrate/20150604101617_rolify_create_roles.rb
mtdevise-1.5.3 db/migrate/20150604101617_rolify_create_roles.rb
mtdevise-1.5.2 db/migrate/20150604101617_rolify_create_roles.rb
mtdevise-1.5.0 db/migrate/20150604101617_rolify_create_roles.rb