blob: b950e36c18cba88572fa4eb3e334f9594fc48952 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
class CreateChatAccounts < ActiveRecord::Migration[5.2]
def change
create_table :chat_accounts do |t|
t.references :account, foreign_key: { on_delete: :cascade }, null: false
t.references :tag, foreign_key: { on_delete: :cascade }, null: false
t.index [:account_id, :tag_id], unique: true
t.index [:tag_id, :account_id]
t.timestamps
end
end
end
|