diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-27 15:10:21 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-27 15:10:21 +0000 |
commit | db4d102e608fdd6d22088e2b0f6b19437259249e (patch) | |
tree | 1289137cc47777a6130a63a77602a8d7657a64d0 /db | |
parent | 4fb40c9fb40c12572585b4fc3f90c5619cf5027b (diff) | |
download | gitlab-ce-db4d102e608fdd6d22088e2b0f6b19437259249e.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r-- | db/post_migrate/20210823113259_steal_merge_request_diff_commit_users_migration.rb | 28 | ||||
-rw-r--r-- | db/schema_migrations/20210823113259 | 1 |
2 files changed, 29 insertions, 0 deletions
diff --git a/db/post_migrate/20210823113259_steal_merge_request_diff_commit_users_migration.rb b/db/post_migrate/20210823113259_steal_merge_request_diff_commit_users_migration.rb new file mode 100644 index 00000000000..7e893d62c28 --- /dev/null +++ b/db/post_migrate/20210823113259_steal_merge_request_diff_commit_users_migration.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# See https://docs.gitlab.com/ee/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class StealMergeRequestDiffCommitUsersMigration < ActiveRecord::Migration[6.1] + include Gitlab::Database::MigrationHelpers + + disable_ddl_transaction! + + def up + job = Gitlab::Database::BackgroundMigrationJob + .for_migration_class('MigrateMergeRequestDiffCommitUsers') + .pending + .last + + return unless job + + # We schedule in one hour so we don't end up running the migrations while a + # deployment is still wrapping up. Not that that really matters, but it + # prevents from too much happening during a deployment window. + migrate_in(1.hour, 'StealMigrateMergeRequestDiffCommitUsers', job.arguments) + end + + def down + # no-op + end +end diff --git a/db/schema_migrations/20210823113259 b/db/schema_migrations/20210823113259 new file mode 100644 index 00000000000..79f416332d8 --- /dev/null +++ b/db/schema_migrations/20210823113259 @@ -0,0 +1 @@ +06b44a856fc970f52b19ad8eeb38f885182003eff50ef1524ecf30887f4664d9
\ No newline at end of file |