diff --git a/app/models/mute.rb b/app/models/mute.rb index 854e5fc2ee..105696da63 100644 --- a/app/models/mute.rb +++ b/app/models/mute.rb @@ -3,12 +3,12 @@ # # Table name: mutes # +# id :integer not null, primary key # created_at :datetime not null # updated_at :datetime not null # account_id :integer not null -# id :integer not null, primary key # target_account_id :integer not null -# hide_notifications :boolean default(FALSE), not null +# hide_notifications :boolean default(TRUE), not null # class Mute < ApplicationRecord diff --git a/db/migrate/20170716191202_add_hide_notifications_to_mute.rb b/db/migrate/20170716191202_add_hide_notifications_to_mute.rb index 48488b5f4b..0410938c9b 100644 --- a/db/migrate/20170716191202_add_hide_notifications_to_mute.rb +++ b/db/migrate/20170716191202_add_hide_notifications_to_mute.rb @@ -1,3 +1,5 @@ +require Rails.root.join('lib', 'mastodon', 'migration_helpers') + class AddHideNotificationsToMute < ActiveRecord::Migration[5.1] include Mastodon::MigrationHelpers diff --git a/db/schema.rb b/db/schema.rb index bcde4a0008..939e7c7028 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -200,7 +200,7 @@ ActiveRecord::Schema.define(version: 20171010025614) 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: false, 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