about summary refs log tree commit diff
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20170716191202_add_hide_notifications_to_mute.rb15
-rw-r--r--db/schema.rb1
2 files changed, 16 insertions, 0 deletions
diff --git a/db/migrate/20170716191202_add_hide_notifications_to_mute.rb b/db/migrate/20170716191202_add_hide_notifications_to_mute.rb
new file mode 100644
index 000000000..0410938c9
--- /dev/null
+++ b/db/migrate/20170716191202_add_hide_notifications_to_mute.rb
@@ -0,0 +1,15 @@
+require Rails.root.join('lib', 'mastodon', 'migration_helpers')
+
+class AddHideNotificationsToMute < ActiveRecord::Migration[5.1]
+  include Mastodon::MigrationHelpers
+
+  disable_ddl_transaction!
+
+  def up
+    add_column_with_default :mutes, :hide_notifications, :boolean, default: true, allow_null: false
+  end
+  
+  def down
+    remove_column :mutes, :hide_notifications
+  end
+end
diff --git a/db/schema.rb b/db/schema.rb
index bf319ce55..2d763e2f4 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -203,6 +203,7 @@ ActiveRecord::Schema.define(version: 20171114080328) do
     t.datetime "updated_at", null: false
     t.bigint "account_id", null: false
     t.bigint "target_account_id", null: false
+    t.boolean "hide_notifications", default: true, null: false
     t.index ["account_id", "target_account_id"], name: "index_mutes_on_account_id_and_target_account_id", unique: true
   end