From 4019c8c256eae72665a2e4b1ffc68891f41f448c Mon Sep 17 00:00:00 2001 From: Bob Van Landuyt Date: Tue, 24 Apr 2018 11:19:58 +0200 Subject: [PATCH] Add `enforce_terms` to `application_settings` Add a flag to applications settings to enforce users to accept terms before using the GitLab instance --- ...24090541_add_enforce_terms_to_application_settings.rb | 9 +++++++++ db/schema.rb | 1 + 2 files changed, 10 insertions(+) create mode 100644 db/migrate/20180424090541_add_enforce_terms_to_application_settings.rb 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| -- GitLab