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
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20210222105120_add_container_registry_access_level.rb')
-rw-r--r--db/migrate/20210222105120_add_container_registry_access_level.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/db/migrate/20210222105120_add_container_registry_access_level.rb b/db/migrate/20210222105120_add_container_registry_access_level.rb
new file mode 100644
index 00000000000..2324866b0ef
--- /dev/null
+++ b/db/migrate/20210222105120_add_container_registry_access_level.rb
@@ -0,0 +1,25 @@
+# frozen_string_literal: true
+
+class AddContainerRegistryAccessLevel < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def up
+ with_lock_retries do
+ add_column(
+ :project_features,
+ :container_registry_access_level,
+ :integer,
+ default: 0, # ProjectFeature::DISABLED value
+ null: false
+ )
+ end
+ end
+
+ def down
+ with_lock_retries do
+ remove_column :project_features, :container_registry_access_level
+ end
+ end
+end