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

20150423033240_add_default_project_visibililty_to_application_settings.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 129ce4d04afe3fb2fe3e2b575583c4830be5d592 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# rubocop:disable all
class AddDefaultProjectVisibililtyToApplicationSettings < ActiveRecord::Migration
  def up
    add_column :application_settings, :default_project_visibility, :integer
    visibility = Settings.gitlab.default_projects_features['visibility_level']
    execute("update application_settings set default_project_visibility = #{visibility}")
  end

  def down
    remove_column :application_settings, :default_project_visibility
  end
end