summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2018-04-24 11:19:58 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2018-05-04 13:52:55 +0200
commit4019c8c256eae72665a2e4b1ffc68891f41f448c (patch)
treea4d08c9930456a3b303440965b6f50d47fc07bde
parent96373b0bcf0798a91e64f57620d55e6973b7bd4c (diff)
downloadgitlab-ce-4019c8c256eae72665a2e4b1ffc68891f41f448c.tar.gz
Add `enforce_terms` to `application_settings`
Add a flag to applications settings to enforce users to accept terms before using the GitLab instance
-rw-r--r--db/migrate/20180424090541_add_enforce_terms_to_application_settings.rb9
-rw-r--r--db/schema.rb1
2 files changed, 10 insertions, 0 deletions
diff --git a/db/migrate/20180424090541_add_enforce_terms_to_application_settings.rb b/db/migrate/20180424090541_add_enforce_terms_to_application_settings.rb
new file mode 100644
index 00000000000..306cd737771
--- /dev/null
+++ b/db/migrate/20180424090541_add_enforce_terms_to_application_settings.rb
@@ -0,0 +1,9 @@
+class AddEnforceTermsToApplicationSettings < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def change
+ add_column :application_settings, :enforce_terms, :boolean, default: false
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index a37e6edc8d1..3d85ffbfee0 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -158,6 +158,7 @@ ActiveRecord::Schema.define(version: 20180503150427) do
t.string "auto_devops_domain"
t.boolean "pages_domain_verification_enabled", default: true, null: false
t.boolean "allow_local_requests_from_hooks_and_services", default: false, null: false
+ t.boolean "enforce_terms", default: false
end
create_table "audit_events", force: :cascade do |t|