diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-12-12 04:38:56 -0600 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-12-12 04:38:56 -0600 |
commit | a8713ee8b73ef63dab45c3c4db949dbfc49a6381 (patch) | |
tree | 51bc07def409119d246bbbcf4e123ebc0572470a /db/migrate | |
parent | 90373b7f3190e86882e764d9cf595f7345a97245 (diff) |
add ability for post authors to kick jerks out of their threads
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 |