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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-02-24 21:19:04 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-02-24 21:19:04 +0300
commit94ca43181461c52ca0381d414387b02e579dbc61 (patch)
tree0d73744d7a846e831f2350bf97aa14a4c2dc7d14 /db
parentc4b4a75c35cb2015c01ef0b60f8ad8baaaf889df (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/post_migrate/20220224000000_async_build_trace_expire_at_index.rb14
-rw-r--r--db/schema_migrations/202202240000001
2 files changed, 15 insertions, 0 deletions
diff --git a/db/post_migrate/20220224000000_async_build_trace_expire_at_index.rb b/db/post_migrate/20220224000000_async_build_trace_expire_at_index.rb
new file mode 100644
index 00000000000..b22f3e7996f
--- /dev/null
+++ b/db/post_migrate/20220224000000_async_build_trace_expire_at_index.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+class AsyncBuildTraceExpireAtIndex < Gitlab::Database::Migration[1.0]
+ INDEX_NAME = 'tmp_index_ci_job_artifacts_on_id_where_trace_and_expire_at'
+ TIMESTAMPS = "'2021-04-22 00:00:00', '2021-05-22 00:00:00', '2021-06-22 00:00:00', '2022-01-22 00:00:00', '2022-02-22 00:00:00', '2022-03-22 00:00:00', '2022-04-22 00:00:00'"
+
+ def up
+ prepare_async_index :ci_job_artifacts, :id, where: "file_type = 3 AND expire_at IN (#{TIMESTAMPS})", name: INDEX_NAME
+ end
+
+ def down
+ unprepare_async_index :ci_builds, :id, name: INDEX_NAME
+ end
+end
diff --git a/db/schema_migrations/20220224000000 b/db/schema_migrations/20220224000000
new file mode 100644
index 00000000000..e6e9aefbabb
--- /dev/null
+++ b/db/schema_migrations/20220224000000
@@ -0,0 +1 @@
+74b4d572118b7f5da0a80722601a4757ce47ccbdae1af1e84b2304343477d634 \ No newline at end of file