Sha256: 0d4c78d75e4dc648f3134d012ce54c183f2f4965c540983de1af1f4072744aa4
Contents?: true
Size: 650 Bytes
Versions: 9
Compression:
Stored size: 650 Bytes
Contents
class CreateAdminUserRoles < ActiveRecord::Migration def change create_table :adminsite_admin_user_roles do |t| t.string :name, null: false t.timestamps end add_index :adminsite_admin_user_roles, :name, unique: true create_table :adminsite_admin_user_roles_users, id: false do |t| t.references :admin_user, null: false t.references :admin_user_role, null: false end add_index :adminsite_admin_user_roles_users, :admin_user_id add_index :adminsite_admin_user_roles_users, :admin_user_role_id Adminsite::AdminUserRole.create [{name: 'admin'}, {name: 'editor'},{name: 'customer'}] end end
Version data entries
9 entries across 9 versions & 1 rubygems