diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-03-20 23:03:53 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-03-20 23:04:07 +0300 |
commit | 8db1292139cfdac4c29c03b876b68b9e752cf75a (patch) | |
tree | 2fcf67ada482ecf4ac90f39c858334a62b709618 /db/migrate/20160308212903_add_default_group_visibility_to_application_settings.rb | |
parent | 2eb19ea3ea36916bbea72a8ccab3e6d15f602ac9 (diff) |
Tweaks, refactoring, and specs
Diffstat (limited to 'db/migrate/20160308212903_add_default_group_visibility_to_application_settings.rb')
-rw-r--r-- | db/migrate/20160308212903_add_default_group_visibility_to_application_settings.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/db/migrate/20160308212903_add_default_group_visibility_to_application_settings.rb b/db/migrate/20160308212903_add_default_group_visibility_to_application_settings.rb index d5c78db0aa3..62d96907c8f 100644 --- a/db/migrate/20160308212903_add_default_group_visibility_to_application_settings.rb +++ b/db/migrate/20160308212903_add_default_group_visibility_to_application_settings.rb @@ -5,7 +5,7 @@ class AddDefaultGroupVisibilityToApplicationSettings < ActiveRecord::Migration def up add_column :application_settings, :default_group_visibility, :integer - execute("update application_settings set default_group_visibility = #{allowed_visibility_level}") + execute("UPDATE application_settings SET default_group_visibility = #{allowed_visibility_level}") end def down @@ -15,6 +15,7 @@ class AddDefaultGroupVisibilityToApplicationSettings < ActiveRecord::Migration private def allowed_visibility_level + # TODO: Don't use `current_application_settings` allowed_levels = Gitlab::VisibilityLevel.values - current_application_settings.restricted_visibility_levels allowed_levels.max end |