blob: 3c275c2b785c2faa4a4eb2f521b81acd332cea17 (
plain) (
blame)
1
2
3
4
5
6
7
8
|
class CreateAccountsTagsJoinTable < ActiveRecord::Migration[5.2]
def change
create_join_table :accounts, :tags do |t|
t.index [:account_id, :tag_id]
t.index [:tag_id, :account_id], unique: true
end
end
end
|