Chatwoot/db/migrate/20220506064938_create_portals_members_join_table.rb
2022-05-16 13:59:59 +05:30

9 lines
273 B
Ruby

class CreatePortalsMembersJoinTable < ActiveRecord::Migration[6.1]
def change
create_join_table :portals, :users, table_name: :portals_members do |t|
t.index :portal_id
t.index :user_id
t.index [:portal_id, :user_id], unique: true
end
end
end