Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20191107173446_add_sourcegraph_admin_and_user_preferences.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 731ed82c9994f038f9eda53fd94666e44a0eff8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

class AddSourcegraphAdminAndUserPreferences < ActiveRecord::Migration[5.2]
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  def up
    add_column(:application_settings, :sourcegraph_public_only, :boolean, default: true, null: false)
    add_column(:user_preferences, :sourcegraph_enabled, :boolean)
  end

  def down
    remove_column(:application_settings, :sourcegraph_public_only)
    remove_column(:user_preferences, :sourcegraph_enabled)
  end
end