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>2023-04-13 21:09:34 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-04-13 21:09:34 +0300
commit53d77359a0e6bf78bfc8ef8c72995eebe1f9e63b (patch)
tree444eb2851a18271c20ea6fd23fab0b02b7e4d9b2 /db
parentdd7da8bd31926a1210011856f7d66ee43fa65156 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/docs/batched_background_migrations/backfill_project_wiki_repositories.yml8
-rw-r--r--db/post_migrate/20230306195007_queue_backfill_project_wiki_repositories.rb16
-rw-r--r--db/post_migrate/20230405200858_requeue_backfill_project_wiki_repositories.rb29
-rw-r--r--db/schema_migrations/202304052008581
4 files changed, 40 insertions, 14 deletions
diff --git a/db/docs/batched_background_migrations/backfill_project_wiki_repositories.yml b/db/docs/batched_background_migrations/backfill_project_wiki_repositories.yml
new file mode 100644
index 00000000000..5adc58a73cd
--- /dev/null
+++ b/db/docs/batched_background_migrations/backfill_project_wiki_repositories.yml
@@ -0,0 +1,8 @@
+---
+migration_job_name: BackfillProjectWikiRepositories
+description: >-
+ Backfills the project_wiki_repositories table for each project that still
+ does not have an entry in this table.
+feature_category: geo
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/113783
+milestone: 15.10
diff --git a/db/post_migrate/20230306195007_queue_backfill_project_wiki_repositories.rb b/db/post_migrate/20230306195007_queue_backfill_project_wiki_repositories.rb
index fd2dc0d16da..8da5536541b 100644
--- a/db/post_migrate/20230306195007_queue_backfill_project_wiki_repositories.rb
+++ b/db/post_migrate/20230306195007_queue_backfill_project_wiki_repositories.rb
@@ -1,25 +1,13 @@
# frozen_string_literal: true
class QueueBackfillProjectWikiRepositories < Gitlab::Database::Migration[2.1]
- MIGRATION = "BackfillProjectWikiRepositories"
- DELAY_INTERVAL = 2.minutes
- BATCH_SIZE = 1000
- SUB_BATCH_SIZE = 100
-
restrict_gitlab_migration gitlab_schema: :gitlab_main
def up
- queue_batched_background_migration(
- MIGRATION,
- :projects,
- :id,
- job_interval: DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- sub_batch_size: SUB_BATCH_SIZE
- )
+ # no-op
end
def down
- delete_batched_background_migration(MIGRATION, :projects, :id, [])
+ # no-op
end
end
diff --git a/db/post_migrate/20230405200858_requeue_backfill_project_wiki_repositories.rb b/db/post_migrate/20230405200858_requeue_backfill_project_wiki_repositories.rb
new file mode 100644
index 00000000000..363a3099064
--- /dev/null
+++ b/db/post_migrate/20230405200858_requeue_backfill_project_wiki_repositories.rb
@@ -0,0 +1,29 @@
+# frozen_string_literal: true
+
+# rubocop:disable BackgroundMigration/MissingDictionaryFile
+class RequeueBackfillProjectWikiRepositories < Gitlab::Database::Migration[2.1]
+ MIGRATION = "BackfillProjectWikiRepositories"
+ DELAY_INTERVAL = 2.minutes
+ BATCH_SIZE = 1000
+ SUB_BATCH_SIZE = 100
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ delete_batched_background_migration(MIGRATION, :projects, :id, [])
+
+ queue_batched_background_migration(
+ MIGRATION,
+ :projects,
+ :id,
+ job_interval: DELAY_INTERVAL,
+ batch_size: BATCH_SIZE,
+ sub_batch_size: SUB_BATCH_SIZE
+ )
+ end
+
+ def down
+ delete_batched_background_migration(MIGRATION, :projects, :id, [])
+ end
+end
+# rubocop:enable BackgroundMigration/MissingDictionaryFile
diff --git a/db/schema_migrations/20230405200858 b/db/schema_migrations/20230405200858
new file mode 100644
index 00000000000..185155ed4d8
--- /dev/null
+++ b/db/schema_migrations/20230405200858
@@ -0,0 +1 @@
+640e7ea2a9b2e90eff427680e5a6e2a2def9b7832a48b7b877f3aa75d8810fd3 \ No newline at end of file