diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-07-21 01:44:16 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-08-30 05:44:01 -0500 |
commit | 263ead73616dba43a0337c2a3edaf96a6382d533 (patch) | |
tree | ca47a9366dbbdf95018c55bde32b59d6b05c8299 /db/migrate | |
parent | 21de9efc2d89ce8dbb9edb997f8a3b99f831d05a (diff) |
[Feature] Add post and thread (un)hiding to backend
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20200720211530_add_hidden_to_conversation_mute.rb | 7 | ||||
-rw-r--r-- | db/migrate/20200720212317_create_status_mutes.rb | 10 |
2 files changed, 17 insertions, 0 deletions
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 |