From 685fafcc279aa80f0aedb814d486eb5e1325f73b Mon Sep 17 00:00:00 2001 From: aschmitz Date: Sun, 22 Oct 2017 21:37:44 -0500 Subject: [PATCH] Fix up migration things --- app/models/mute.rb | 4 ++-- db/migrate/20170716191202_add_hide_notifications_to_mute.rb | 2 ++ db/schema.rb | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/models/mute.rb b/app/models/mute.rb index 854e5fc2e..105696da6 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 48488b5f4..0410938c9 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 bcde4a000..939e7c702 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