diff --git a/EzOnRails/lib/generators/ez_on_rails/ezapp/templates/db/migrate/create_user_group_assignments.rb.erb b/EzOnRails/lib/generators/ez_on_rails/ezapp/templates/db/migrate/create_user_group_assignments.rb.erb index 5bf91f1..4e828bc 100644 --- a/EzOnRails/lib/generators/ez_on_rails/ezapp/templates/db/migrate/create_user_group_assignments.rb.erb +++ b/EzOnRails/lib/generators/ez_on_rails/ezapp/templates/db/migrate/create_user_group_assignments.rb.erb @@ -7,7 +7,7 @@ class CreateUserGroupAssignments < ActiveRecord::Migration[5.2] create_table :<%= EzOnRails::ApplicationRecord::TABLE_PREFIX %>user_group_assignments do |t| t.belongs_to :user, index: true, null: false, foreign_key: true t.belongs_to :group, index: true, null: false, foreign_key: { to_table: :eor_groups } - t.belongs_to :resource, index: true, null: true, polymorphic: true + t.belongs_to :resource, index: { name: '<%= EzOnRails::ApplicationRecord::TABLE_PREFIX %>user_group_assignments_resource_index' }, null: true, polymorphic: true t.belongs_to :owner, index: true, null: true, foreign_key: { to_table: :users } diff --git a/Gemfile.lock b/Gemfile.lock index b2f8362..4eacc3e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: EzOnRails specs: - ez_on_rails (0.7.4) + ez_on_rails (0.8.0) cancancan cocoon devise