2018-11-13 07:27:31 +00:00
|
|
|
class AddDefaultSnippetVisibilityToAppSettings < ActiveRecord::Migration[4.2]
|
2015-05-13 15:02:30 +00:00
|
|
|
def up
|
2015-04-26 05:01:52 +00:00
|
|
|
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
|
2015-05-13 15:02:30 +00:00
|
|
|
|
|
|
|
def down
|
|
|
|
remove_column :application_settings, :default_snippet_visibility
|
|
|
|
end
|
2015-04-26 05:01:52 +00:00
|
|
|
end
|