Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20220328095848_delete_failed_reset_duplicate_ci_runners_token_migration_records.rb « post_migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3c1a6a48ef59be300176eadc905280ea96f9aa07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

class DeleteFailedResetDuplicateCiRunnersTokenMigrationRecords < Gitlab::Database::Migration[1.0]
  def up
    # Delete remaining records of botched migrations before we start the new migrations
    Gitlab::Database::BackgroundMigrationJob
      .for_migration_class('ResetDuplicateCiRunnersTokenValuesOnProjects')
      .delete_all
    Gitlab::Database::BackgroundMigrationJob
      .for_migration_class('ResetDuplicateCiRunnersTokenEncryptedValuesOnProjects')
      .delete_all
  end

  def down
    # no-op
  end
end