summaryrefslogtreecommitdiff
path: root/db/migrate/20210312193532_add_resource_access_token_creation_allowed_to_namespace_settin...
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-04-20 14:36:54 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-04-20 14:36:54 +0000
commitf61bb2a16a514b71bf33aabbbb999d6732016a24 (patch)
tree9548caa89e60b4f40b99bbd1dac030420b812aa8 /db/migrate/20210312193532_add_resource_access_token_creation_allowed_to_namespace_settings.rb
parent35fc54e5d261f8898e390aea7c2f5ec5fdf0539d (diff)
downloadgitlab-ce-4a647b2732a66bd1012cef18484571aacad42b5a.tar.gz
Add latest changes from gitlab-org/gitlab@13-11-stable-eev13.11.0-rc42
Diffstat (limited to 'db/migrate/20210312193532_add_resource_access_token_creation_allowed_to_namespace_settings.rb')
-rw-r--r--db/migrate/20210312193532_add_resource_access_token_creation_allowed_to_namespace_settings.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/db/migrate/20210312193532_add_resource_access_token_creation_allowed_to_namespace_settings.rb b/db/migrate/20210312193532_add_resource_access_token_creation_allowed_to_namespace_settings.rb
new file mode 100644
index 00000000000..1de9d87cf25
--- /dev/null
+++ b/db/migrate/20210312193532_add_resource_access_token_creation_allowed_to_namespace_settings.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+class AddResourceAccessTokenCreationAllowedToNamespaceSettings < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ with_lock_retries do
+ add_column :namespace_settings, :resource_access_token_creation_allowed, :boolean, default: true, null: false
+ end
+ end
+
+ def down
+ with_lock_retries do
+ remove_column :namespace_settings, :resource_access_token_creation_allowed
+ end
+ end
+end