Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-06-14 20:49:13 +0300
committerStan Hu <stanhu@gmail.com>2019-06-14 20:49:13 +0300
commit26ae8788218037c3ec7e12efc67ea3baa237972a (patch)
tree209efca8e1d043b2f9470137b6c4625a0a41a11f /db
parent34b8231d49c880fc07f63c0b48f916a4f864e9c5 (diff)
parent7b1b66416b5287e5e5f928a276440d9b1e4badb5 (diff)
Merge branch '4354-lock-memberships-to-ldap-sync-part-1' into 'master'
EE migration port: add app-wide LDAP membership lock field See merge request gitlab-org/gitlab-ce!29302
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20190604091310_add_ldap_membership_lock.rb20
-rw-r--r--db/schema.rb1
2 files changed, 21 insertions, 0 deletions
diff --git a/db/migrate/20190604091310_add_ldap_membership_lock.rb b/db/migrate/20190604091310_add_ldap_membership_lock.rb
new file mode 100644
index 00000000000..1afc6aeefd5
--- /dev/null
+++ b/db/migrate/20190604091310_add_ldap_membership_lock.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+# See http://doc.gitlab.com/ce/development/migration_style_guide.html
+# for more information on how to write migrations for GitLab.
+
+class AddLdapMembershipLock < ActiveRecord::Migration[5.1]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_column_with_default(:application_settings, :lock_memberships_to_ldap, :boolean, default: false)
+ end
+
+ def down
+ remove_column(:application_settings, :lock_memberships_to_ldap)
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 86a099d28b2..4ed7c0cb248 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -195,6 +195,7 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.text "encrypted_lets_encrypt_private_key_iv"
t.boolean "dns_rebinding_protection_enabled", default: true, null: false
t.boolean "default_project_deletion_protection", default: false, null: false
+ t.boolean "lock_memberships_to_ldap", default: false, null: false
t.index ["usage_stats_set_by_user_id"], name: "index_application_settings_on_usage_stats_set_by_user_id", using: :btree
end