Commit 0f871450 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Hide for instance statistics by default

Changing the default in a new migration and updating the existing
values to change the defaults for instances already exposing the statistics.
parent 313b79d8
# frozen_string_literal: true
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class ChangeInstanceStatsVisibilityDefault < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def up
change_column_default :application_settings,
:instance_statistics_visibility_private,
true
ApplicationSetting.update_all(instance_statistics_visibility_private: true)
end
def down
change_column_default :application_settings,
:instance_statistics_visibility_private,
false
end
end
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20180726172057) do ActiveRecord::Schema.define(version: 20180806094307) do
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "plpgsql" enable_extension "plpgsql"
...@@ -168,7 +168,7 @@ ActiveRecord::Schema.define(version: 20180726172057) do ...@@ -168,7 +168,7 @@ ActiveRecord::Schema.define(version: 20180726172057) do
t.boolean "enforce_terms", default: false t.boolean "enforce_terms", default: false
t.boolean "mirror_available", default: true, null: false t.boolean "mirror_available", default: true, null: false
t.boolean "hide_third_party_offers", default: false, null: false t.boolean "hide_third_party_offers", default: false, null: false
t.boolean "instance_statistics_visibility_private", default: false, null: false t.boolean "instance_statistics_visibility_private", default: true, null: false
end end
create_table "audit_events", force: :cascade do |t| create_table "audit_events", force: :cascade do |t|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment