diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-05-13 18:02:30 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-05-13 18:03:29 +0300 |
commit | a9103eae3a2e92517d01f82aeaa923983420916f (patch) | |
tree | 6d4d6dbb59e20a5c5ffd9b3a52809d678a22816b /db/migrate/20150425173433_add_default_snippet_visibility_to_app_settings.rb | |
parent | cc0a4b7ee896a1d0ca1b0d50d6d4f9f9b480e3d0 (diff) |
Make more migrations reversible
[ci skip]
Diffstat (limited to 'db/migrate/20150425173433_add_default_snippet_visibility_to_app_settings.rb')
-rw-r--r-- | db/migrate/20150425173433_add_default_snippet_visibility_to_app_settings.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/db/migrate/20150425173433_add_default_snippet_visibility_to_app_settings.rb b/db/migrate/20150425173433_add_default_snippet_visibility_to_app_settings.rb index 51237354d9f..8f1b0cc8935 100644 --- a/db/migrate/20150425173433_add_default_snippet_visibility_to_app_settings.rb +++ b/db/migrate/20150425173433_add_default_snippet_visibility_to_app_settings.rb @@ -1,7 +1,11 @@ class AddDefaultSnippetVisibilityToAppSettings < ActiveRecord::Migration - def change + def up 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 + + def down + remove_column :application_settings, :default_snippet_visibility + end end |