BigW Consortium Gitlab

20150425173433_add_default_snippet_visibility_to_app_settings.rb 446 Bytes
Newer Older
1
# rubocop:disable all
Vinnie Okada committed
2
class AddDefaultSnippetVisibilityToAppSettings < ActiveRecord::Migration
3
  def up
Vinnie Okada committed
4 5 6 7
    add_column :application_settings, :default_snippet_visibility, :integer
    visibility = Settings.gitlab.default_projects_features['visibility_level']
    execute("update application_settings set default_snippet_visibility = #{visibility}")
  end
8 9 10 11

  def down
    remove_column :application_settings, :default_snippet_visibility
  end
Vinnie Okada committed
12
end