From 263ead73616dba43a0337c2a3edaf96a6382d533 Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Tue, 21 Jul 2020 01:44:16 -0500 Subject: [Feature] Add post and thread (un)hiding to backend --- db/migrate/20200720211530_add_hidden_to_conversation_mute.rb | 7 +++++++ db/migrate/20200720212317_create_status_mutes.rb | 10 ++++++++++ 2 files changed, 17 insertions(+) create mode 100644 db/migrate/20200720211530_add_hidden_to_conversation_mute.rb create mode 100644 db/migrate/20200720212317_create_status_mutes.rb (limited to 'db/migrate') diff --git a/db/migrate/20200720211530_add_hidden_to_conversation_mute.rb b/db/migrate/20200720211530_add_hidden_to_conversation_mute.rb new file mode 100644 index 000000000..aa7b31d8b --- /dev/null +++ b/db/migrate/20200720211530_add_hidden_to_conversation_mute.rb @@ -0,0 +1,7 @@ +class AddHiddenToConversationMute < ActiveRecord::Migration[5.2] + def change + safety_assured do + add_column :conversation_mutes, :hidden, :boolean, default: false, null: false + end + end +end diff --git a/db/migrate/20200720212317_create_status_mutes.rb b/db/migrate/20200720212317_create_status_mutes.rb new file mode 100644 index 000000000..efd8f15c8 --- /dev/null +++ b/db/migrate/20200720212317_create_status_mutes.rb @@ -0,0 +1,10 @@ +class CreateStatusMutes < ActiveRecord::Migration[5.2] + def change + create_table :status_mutes do |t| + t.integer :account_id, null: false, index: true + t.bigint :status_id, null: false, index: true + end + + add_index :status_mutes, [:account_id, :status_id], unique: true + end +end -- cgit