summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorDravere <floriangraf@gmx.ch>2016-07-06 19:46:41 +0200
committerDravere <floriangraf@gmx.ch>2016-07-07 19:21:18 +0200
commita0a9494e4e6db3cfcdecae0a7e9c2877432fa30b (patch)
treed9a0ef27d88d3c5ae6492ddede5827f98633bd03 /db
parent062c7a30742d617d8d0939c3bb6ba733919fe00b (diff)
downloadgitlab-ce-a0a9494e4e6db3cfcdecae0a7e9c2877432fa30b.tar.gz
Added setting to set new users by default as external
As requested by the issue #14508 this adds an option in the application settings to set newly registered users by default as external. The default setting is set to false to stay backward compatible.
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20160608211215_add_user_default_external_to_application_settings.rb13
-rw-r--r--db/schema.rb1
2 files changed, 14 insertions, 0 deletions
diff --git a/db/migrate/20160608211215_add_user_default_external_to_application_settings.rb b/db/migrate/20160608211215_add_user_default_external_to_application_settings.rb
new file mode 100644
index 00000000000..34c702e3fa6
--- /dev/null
+++ b/db/migrate/20160608211215_add_user_default_external_to_application_settings.rb
@@ -0,0 +1,13 @@
+class AddUserDefaultExternalToApplicationSettings < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+ disable_ddl_transaction!
+
+ def up
+ add_column_with_default(:application_settings, :user_default_external, :boolean,
+ default: false, allow_null: false)
+ end
+
+ def down
+ remove_column(:application_settings, :user_default_external)
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index f6465136e6a..97819731a4c 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -84,6 +84,7 @@ ActiveRecord::Schema.define(version: 20160705163108) do
t.string "health_check_access_token"
t.boolean "send_user_confirmation_email", default: false
t.integer "container_registry_token_expire_delay", default: 5
+ t.boolean "user_default_external", default: false, null: false
t.text "after_sign_up_text"
t.string "repository_storage", default: "default"
t.string "enabled_git_access_protocol"