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/20210826120834_add_locked_to_ci_job_artifacts.rb')
-rw-r--r--db/migrate/20210826120834_add_locked_to_ci_job_artifacts.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/db/migrate/20210826120834_add_locked_to_ci_job_artifacts.rb b/db/migrate/20210826120834_add_locked_to_ci_job_artifacts.rb
new file mode 100644
index 00000000000..2149265b4e7
--- /dev/null
+++ b/db/migrate/20210826120834_add_locked_to_ci_job_artifacts.rb
@@ -0,0 +1,22 @@
+# frozen_string_literal: true
+
+class AddLockedToCiJobArtifacts < ActiveRecord::Migration[6.1]
+ include Gitlab::Database::MigrationHelpers
+
+ disable_ddl_transaction!
+
+ TABLE_NAME = 'ci_job_artifacts'
+ COLUMN_NAME = 'locked'
+
+ def up
+ with_lock_retries do
+ add_column TABLE_NAME, COLUMN_NAME, :smallint, default: 2
+ end
+ end
+
+ def down
+ with_lock_retries do
+ remove_column TABLE_NAME, COLUMN_NAME
+ end
+ end
+end