diff options
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20191212043419_create_conversation_kicks.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/db/migrate/20191212043419_create_conversation_kicks.rb b/db/migrate/20191212043419_create_conversation_kicks.rb new file mode 100644 index 000000000..533114845 --- /dev/null +++ b/db/migrate/20191212043419_create_conversation_kicks.rb @@ -0,0 +1,10 @@ +class CreateConversationKicks < ActiveRecord::Migration[5.2] + def change + create_table :conversation_kicks do |t| + t.references :account, null: false, foreign_key: {on_delete: :cascade} + t.references :conversation, null: false, foreign_key: {on_delete: :cascade} + end + + add_index :conversation_kicks, [:account_id, :conversation_id], unique: true + end +end |