Class: CreateAuthisticBehaviour
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateAuthisticBehaviour
- Defined in:
- lib/generators/templates/core_migration.rb
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/generators/templates/core_migration.rb', line 2 def change create_table :roles do |t| t.string :name end create_table :role_subscriptions do |t| t.references :role, index: true t.references :authorizable, index: { name: 'index_role_subs_on_auth_id_and_auth_type_authist' }, polymorphic: true end create_table :roles_roles do |t| t.references :role, index: true t.references :includer, index: true end end |