class CreateJoinTableDot < ActiveRecord::Migration[5.2] def change create_join_table :dotations, :expenses do |t| t.index [:dotation_id, :expense_id], name: 'dot_expind' # t.index [:role_id, :user_id] end create_join_table :dotations, :tags do |t| t.index [:dotation_id, :tag_id], name: 'dot_tag_ind' # t.index [:role_id, :user_id] end create_join_table :dotations, :projects do |t| t.index [:dotation_id, :project_id], name: 'dot_pro_ind' # t.index [:role_id, :user_id] end create_join_table :dotations, :company_activities do |t| t.index [:dotation_id, :company_activity_id], name: 'dot_comp_ind' # t.index [:role_id, :user_id] end end end