diff options
-rw-r--r-- | db/post_migrate/20221021082256_finish_reset_duplicate_ci_runners_token_values.rb | 21 | ||||
-rw-r--r-- | db/post_migrate/20221021082257_add_unique_index_on_ci_runners_token.rb (renamed from db/post_migrate/20221021082255_add_unique_index_on_ci_runners_token.rb) | 8 | ||||
-rw-r--r-- | db/post_migrate/20221021082313_finish_reset_duplicate_ci_runners_token_encrypted_values.rb | 21 | ||||
-rw-r--r-- | db/post_migrate/20221021082314_add_unique_index_on_ci_runners_token_encrypted.rb (renamed from db/post_migrate/20221021082312_add_unique_index_on_ci_runners_token_encrypted.rb) | 8 | ||||
-rw-r--r-- | db/schema_migrations/20221021082255 | 1 | ||||
-rw-r--r-- | db/schema_migrations/20221021082256 | 1 | ||||
-rw-r--r-- | db/schema_migrations/20221021082257 | 1 | ||||
-rw-r--r-- | db/schema_migrations/20221021082312 | 1 | ||||
-rw-r--r-- | db/schema_migrations/20221021082313 | 1 | ||||
-rw-r--r-- | db/schema_migrations/20221021082314 | 1 |
10 files changed, 52 insertions, 12 deletions
diff --git a/db/post_migrate/20221021082256_finish_reset_duplicate_ci_runners_token_values.rb b/db/post_migrate/20221021082256_finish_reset_duplicate_ci_runners_token_values.rb new file mode 100644 index 00000000000..4e6195bb3c8 --- /dev/null +++ b/db/post_migrate/20221021082256_finish_reset_duplicate_ci_runners_token_values.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class FinishResetDuplicateCiRunnersTokenValues < Gitlab::Database::Migration[2.0] + disable_ddl_transaction! + + restrict_gitlab_migration gitlab_schema: :gitlab_ci + + def up + ensure_batched_background_migration_is_finished( + job_class_name: 'ResetDuplicateCiRunnersTokenValues', + table_name: :ci_runners, + column_name: :id, + job_arguments: [], + finalize: true + ) + end + + def down + # no-op + end +end diff --git a/db/post_migrate/20221021082255_add_unique_index_on_ci_runners_token.rb b/db/post_migrate/20221021082257_add_unique_index_on_ci_runners_token.rb index 3dfa44f9615..3858c0efe06 100644 --- a/db/post_migrate/20221021082255_add_unique_index_on_ci_runners_token.rb +++ b/db/post_migrate/20221021082257_add_unique_index_on_ci_runners_token.rb @@ -6,12 +6,10 @@ class AddUniqueIndexOnCiRunnersToken < Gitlab::Database::Migration[2.0] INDEX_NAME = 'index_uniq_ci_runners_on_token' def up - finalize_background_migration 'ResetDuplicateCiRunnersTokenValues' - add_concurrent_index :ci_runners, - :token, - name: INDEX_NAME, - unique: true + :token, + name: INDEX_NAME, + unique: true end def down diff --git a/db/post_migrate/20221021082313_finish_reset_duplicate_ci_runners_token_encrypted_values.rb b/db/post_migrate/20221021082313_finish_reset_duplicate_ci_runners_token_encrypted_values.rb new file mode 100644 index 00000000000..ba08322b1ff --- /dev/null +++ b/db/post_migrate/20221021082313_finish_reset_duplicate_ci_runners_token_encrypted_values.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class FinishResetDuplicateCiRunnersTokenEncryptedValues < Gitlab::Database::Migration[2.0] + disable_ddl_transaction! + + restrict_gitlab_migration gitlab_schema: :gitlab_ci + + def up + ensure_batched_background_migration_is_finished( + job_class_name: 'ResetDuplicateCiRunnersTokenEncryptedValues', + table_name: :ci_runners, + column_name: :id, + job_arguments: [], + finalize: true + ) + end + + def down + # no-op + end +end diff --git a/db/post_migrate/20221021082312_add_unique_index_on_ci_runners_token_encrypted.rb b/db/post_migrate/20221021082314_add_unique_index_on_ci_runners_token_encrypted.rb index 8728c0ff20e..12fc6a72e84 100644 --- a/db/post_migrate/20221021082312_add_unique_index_on_ci_runners_token_encrypted.rb +++ b/db/post_migrate/20221021082314_add_unique_index_on_ci_runners_token_encrypted.rb @@ -6,12 +6,10 @@ class AddUniqueIndexOnCiRunnersTokenEncrypted < Gitlab::Database::Migration[2.0] INDEX_NAME = 'index_uniq_ci_runners_on_token_encrypted' def up - finalize_background_migration 'ResetDuplicateCiRunnersTokenEncryptedValues' - add_concurrent_index :ci_runners, - :token_encrypted, - name: INDEX_NAME, - unique: true + :token_encrypted, + name: INDEX_NAME, + unique: true end def down diff --git a/db/schema_migrations/20221021082255 b/db/schema_migrations/20221021082255 deleted file mode 100644 index afb266271d4..00000000000 --- a/db/schema_migrations/20221021082255 +++ /dev/null @@ -1 +0,0 @@ -10caa548bccc134775ed14f85eae2b2063e83afe4a932982c353ecf1549a557d
\ No newline at end of file diff --git a/db/schema_migrations/20221021082256 b/db/schema_migrations/20221021082256 new file mode 100644 index 00000000000..0074889957f --- /dev/null +++ b/db/schema_migrations/20221021082256 @@ -0,0 +1 @@ +48c2eca5f5feea194eadc9d259f83e54fecbc7be1d219647d0b09ce4e5410eb4
\ No newline at end of file diff --git a/db/schema_migrations/20221021082257 b/db/schema_migrations/20221021082257 new file mode 100644 index 00000000000..43ca84c0427 --- /dev/null +++ b/db/schema_migrations/20221021082257 @@ -0,0 +1 @@ +1f3bf844501eee018b9594b447e55fac6c4628a22a9070cd95f37398067b03d6
\ No newline at end of file diff --git a/db/schema_migrations/20221021082312 b/db/schema_migrations/20221021082312 deleted file mode 100644 index 26007002f54..00000000000 --- a/db/schema_migrations/20221021082312 +++ /dev/null @@ -1 +0,0 @@ -86d979a179c504508fd2e9c1a62e935884297054b13b78a4c1460679d75f5b96
\ No newline at end of file diff --git a/db/schema_migrations/20221021082313 b/db/schema_migrations/20221021082313 new file mode 100644 index 00000000000..5c70993f0b4 --- /dev/null +++ b/db/schema_migrations/20221021082313 @@ -0,0 +1 @@ +9383e4f5ec51cf2971c98b4575546099c551b2a9f328f081c57866dc91838896
\ No newline at end of file diff --git a/db/schema_migrations/20221021082314 b/db/schema_migrations/20221021082314 new file mode 100644 index 00000000000..c35ab7664ef --- /dev/null +++ b/db/schema_migrations/20221021082314 @@ -0,0 +1 @@ +2711e477b81213c7221001a9c75dde169a5b8f2cc2a05534dcdae16ace9231a9
\ No newline at end of file |