Chatwoot/db/migrate/20220506064938_create_portals_members_join_table.rb

10 lines
273 B
Ruby
Raw Normal View History

2022-05-16 08:29:59 +00:00
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