diff --git a/app/models/user.rb b/app/models/user.rb index 5d19d873f431ec3fd7adac9aec8c6a91207863c5..b88d0ab66b10cafcc9d0c83187125a8b3e10c8d0 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -22,6 +22,7 @@ class User < ActiveRecord::Base default_value_for :hide_no_ssh_key, false default_value_for :hide_no_password, false default_value_for :project_view, :files + default_value_for :notified_of_own_activity, false attr_encrypted :otp_secret, key: Gitlab::Application.secrets.otp_key_base, diff --git a/db/post_migrate/20170317131326_add_notified_of_own_activity_default.rb b/db/post_migrate/20170317131326_add_notified_of_own_activity_default.rb deleted file mode 100644 index f01ef6b41194f444df5dbd84c6cac1d3229000ee..0000000000000000000000000000000000000000 --- a/db/post_migrate/20170317131326_add_notified_of_own_activity_default.rb +++ /dev/null @@ -1,20 +0,0 @@ -class AddNotifiedOfOwnActivityDefault < ActiveRecord::Migration - include Gitlab::Database::MigrationHelpers - disable_ddl_transaction! - - DOWNTIME = false - - def up - begin - update_column_in_batches(:users, :notified_of_own_activity, false) do |table, query| - query.where(table[:notified_of_own_activity].eq(nil)) - end - - change_column :users, :notified_of_own_activity, :boolean, default: false, null: false - end - end - - def down - change_column_default :users, :notified_of_own_activity, nil - end -end diff --git a/db/schema.rb b/db/schema.rb index 47833b7e518ca536ffd3420fcfbcf88abd805f60..f476637ceb2499632f43101c391cd6409473a39b 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1236,7 +1236,7 @@ ActiveRecord::Schema.define(version: 20170317203554) do t.string "organization" t.boolean "authorized_projects_populated" t.boolean "ghost" - t.boolean "notified_of_own_activity", default: false, null: false + t.boolean "notified_of_own_activity" end add_index "users", ["admin"], name: "index_users_on_admin", using: :btree