summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20160308212903_add_default_group_visibility_to_application_settings.rb11
-rw-r--r--db/schema.rb3
2 files changed, 13 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
new file mode 100644
index 00000000000..c2bdd7b31fa
--- /dev/null
+++ b/db/migrate/20160308212903_add_default_group_visibility_to_application_settings.rb
@@ -0,0 +1,11 @@
+class AddDefaultGroupVisibilityToApplicationSettings < ActiveRecord::Migration
+ def up
+ add_column :application_settings, :default_group_visibility, :integer
+ visibility = Settings.gitlab.default_groups_features['visibility_level']
+ execute("update application_settings set default_group_visibility = #{visibility}")
+ end
+
+ def down
+ remove_column :application_settings, :default_group_visibility
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index d2f311e42da..1d4e18c5f95 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20160301124843) do
+ActiveRecord::Schema.define(version: 20160308212903) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -75,6 +75,7 @@ ActiveRecord::Schema.define(version: 20160301124843) do
t.boolean "akismet_enabled", default: false
t.string "akismet_api_key"
t.boolean "email_author_in_body", default: false
+ t.integer "default_group_visibility"
end
create_table "audit_events", force: :cascade do |t|