diff --git a/scripts/verify-tff-mapping b/scripts/verify-tff-mapping
index 4ce0ec306d7a4aff93468af1655664d9db577338..0bf4db52698e618dca693188a89cfc3254919c32 100755
--- a/scripts/verify-tff-mapping
+++ b/scripts/verify-tff-mapping
@@ -90,8 +90,8 @@ tests = [
 
   {
     explanation: 'Migration should map to its non-timestamped spec',
-    source: 'db/migrate/20221014034338_populate_releases_access_level_from_repository.rb',
-    expected: ['spec/migrations/populate_releases_access_level_from_repository_spec.rb']
+    source: 'db/migrate/20221011062254_sync_new_amount_used_for_ci_project_monthly_usages.rb',
+    expected: ['spec/migrations/sync_new_amount_used_for_ci_project_monthly_usages_spec.rb']
   },
   # rubocop:disable Layout/LineLength
   {
diff --git a/spec/migrations/20211203091642_add_index_to_projects_on_marked_for_deletion_at_spec.rb b/spec/migrations/20211203091642_add_index_to_projects_on_marked_for_deletion_at_spec.rb
deleted file mode 100644
index a513e80a510a1900024dc2c443147603f7024e98..0000000000000000000000000000000000000000
--- a/spec/migrations/20211203091642_add_index_to_projects_on_marked_for_deletion_at_spec.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe AddIndexToProjectsOnMarkedForDeletionAt, feature_category: :groups_and_projects do
-  it 'correctly migrates up and down' do
-    reversible_migration do |migration|
-      migration.before -> {
-        expect(ActiveRecord::Base.connection.indexes('projects').map(&:name)).not_to include('index_projects_not_aimed_for_deletion')
-      }
-
-      migration.after -> {
-        expect(ActiveRecord::Base.connection.indexes('projects').map(&:name)).to include('index_projects_not_aimed_for_deletion')
-      }
-    end
-  end
-end
diff --git a/spec/migrations/20211207125331_remove_jobs_for_recalculate_vulnerabilities_occurrences_uuid_spec.rb b/spec/migrations/20211207125331_remove_jobs_for_recalculate_vulnerabilities_occurrences_uuid_spec.rb
deleted file mode 100644
index 9fa2ac2313afa5a9ceea0be9d8690e761ef90a03..0000000000000000000000000000000000000000
--- a/spec/migrations/20211207125331_remove_jobs_for_recalculate_vulnerabilities_occurrences_uuid_spec.rb
+++ /dev/null
@@ -1,45 +0,0 @@
-# frozen_string_literal: true
-require 'spec_helper'
-require_migration!
-
-def create_background_migration_jobs(ids, status, created_at)
-  proper_status = case status
-                  when :pending
-                    Gitlab::Database::BackgroundMigrationJob.statuses['pending']
-                  when :succeeded
-                    Gitlab::Database::BackgroundMigrationJob.statuses['succeeded']
-                  else
-                    raise ArgumentError
-                  end
-
-  background_migration_jobs.create!(
-    class_name: 'RecalculateVulnerabilitiesOccurrencesUuid',
-    arguments: Array(ids),
-    status: proper_status,
-    created_at: created_at
-  )
-end
-
-RSpec.describe RemoveJobsForRecalculateVulnerabilitiesOccurrencesUuid, :migration,
-  feature_category: :vulnerability_management do
-  let!(:background_migration_jobs) { table(:background_migration_jobs) }
-
-  context 'when RecalculateVulnerabilitiesOccurrencesUuid jobs are present' do
-    before do
-      create_background_migration_jobs([1, 2, 3], :succeeded, DateTime.new(2021, 5, 5, 0, 2))
-      create_background_migration_jobs([4, 5, 6], :pending, DateTime.new(2021, 5, 5, 0, 4))
-
-      create_background_migration_jobs([1, 2, 3], :succeeded, DateTime.new(2021, 8, 18, 0, 0))
-      create_background_migration_jobs([4, 5, 6], :pending, DateTime.new(2021, 8, 18, 0, 2))
-      create_background_migration_jobs([7, 8, 9], :pending, DateTime.new(2021, 8, 18, 0, 4))
-    end
-
-    it 'removes all jobs' do
-      expect(background_migration_jobs.count).to eq(5)
-
-      migrate!
-
-      expect(background_migration_jobs.count).to eq(0)
-    end
-  end
-end
diff --git a/spec/migrations/20211207135331_schedule_recalculate_uuid_on_vulnerabilities_occurrences4_spec.rb b/spec/migrations/20211207135331_schedule_recalculate_uuid_on_vulnerabilities_occurrences4_spec.rb
deleted file mode 100644
index c7401c4790d15e69720f7666c244bea18164374d..0000000000000000000000000000000000000000
--- a/spec/migrations/20211207135331_schedule_recalculate_uuid_on_vulnerabilities_occurrences4_spec.rb
+++ /dev/null
@@ -1,148 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe ScheduleRecalculateUuidOnVulnerabilitiesOccurrences4, feature_category: :vulnerability_management do
-  let(:namespace) { table(:namespaces).create!(name: 'user', path: 'user') }
-  let(:users) { table(:users) }
-  let(:user) { create_user! }
-  let(:project) { table(:projects).create!(id: 123, namespace_id: namespace.id) }
-  let(:scanners) { table(:vulnerability_scanners) }
-  let(:scanner) { scanners.create!(project_id: project.id, external_id: 'test 1', name: 'test scanner 1') }
-  let(:different_scanner) { scanners.create!(project_id: project.id, external_id: 'test 2', name: 'test scanner 2') }
-  let(:vulnerabilities) { table(:vulnerabilities) }
-  let(:vulnerabilities_findings) { table(:vulnerability_occurrences) }
-  let(:vulnerability_finding_signatures) { table(:vulnerability_finding_signatures) }
-  let(:vulnerability_identifiers) { table(:vulnerability_identifiers) }
-  let(:vulnerability_identifier) do
-    vulnerability_identifiers.create!(
-      project_id: project.id,
-      external_type: 'uuid-v5',
-      external_id: 'uuid-v5',
-      fingerprint: '7e394d1b1eb461a7406d7b1e08f057a1cf11287a',
-      name: 'Identifier for UUIDv5')
-  end
-
-  let(:different_vulnerability_identifier) do
-    vulnerability_identifiers.create!(
-      project_id: project.id,
-      external_type: 'uuid-v4',
-      external_id: 'uuid-v4',
-      fingerprint: '772da93d34a1ba010bcb5efa9fb6f8e01bafcc89',
-      name: 'Identifier for UUIDv4')
-  end
-
-  let!(:uuidv4_finding) do
-    create_finding!(
-      vulnerability_id: vulnerability_for_uuidv4.id,
-      project_id: project.id,
-      scanner_id: different_scanner.id,
-      primary_identifier_id: different_vulnerability_identifier.id,
-      location_fingerprint: Gitlab::Database::ShaAttribute.serialize('fa18f432f1d56675f4098d318739c3cd5b14eb3e'),
-      uuid: 'b3cc2518-5446-4dea-871c-89d5e999c1ac'
-    )
-  end
-
-  let(:vulnerability_for_uuidv4) do
-    create_vulnerability!(
-      project_id: project.id,
-      author_id: user.id
-    )
-  end
-
-  let!(:uuidv5_finding) do
-    create_finding!(
-      vulnerability_id: vulnerability_for_uuidv5.id,
-      project_id: project.id,
-      scanner_id: scanner.id,
-      primary_identifier_id: vulnerability_identifier.id,
-      location_fingerprint: Gitlab::Database::ShaAttribute.serialize('838574be0210968bf6b9f569df9c2576242cbf0a'),
-      uuid: '77211ed6-7dff-5f6b-8c9a-da89ad0a9b60'
-    )
-  end
-
-  let(:vulnerability_for_uuidv5) do
-    create_vulnerability!(
-      project_id: project.id,
-      author_id: user.id
-    )
-  end
-
-  let(:vulnerability_for_finding_with_signature) do
-    create_vulnerability!(
-      project_id: project.id,
-      author_id: user.id
-    )
-  end
-
-  let!(:finding_with_signature) do
-    create_finding!(
-      vulnerability_id: vulnerability_for_finding_with_signature.id,
-      project_id: project.id,
-      scanner_id: scanner.id,
-      primary_identifier_id: vulnerability_identifier.id,
-      report_type: 0, # "sast"
-      location_fingerprint: Gitlab::Database::ShaAttribute.serialize('123609eafffffa2207a9ca2425ba4337h34fga1b'),
-      uuid: '252aa474-d689-5d2b-ab42-7bbb5a100c02'
-    )
-  end
-
-  before do
-    stub_const("#{described_class}::BATCH_SIZE", 1)
-  end
-
-  around do |example|
-    freeze_time { Sidekiq::Testing.fake! { example.run } }
-  end
-
-  it 'schedules background migrations', :aggregate_failures do
-    migrate!
-
-    expect(BackgroundMigrationWorker.jobs.size).to eq(3)
-    expect(described_class::MIGRATION).to be_scheduled_delayed_migration(2.minutes, uuidv4_finding.id, uuidv4_finding.id)
-    expect(described_class::MIGRATION).to be_scheduled_delayed_migration(4.minutes, uuidv5_finding.id, uuidv5_finding.id)
-    expect(described_class::MIGRATION).to be_scheduled_delayed_migration(6.minutes, finding_with_signature.id, finding_with_signature.id)
-  end
-
-  private
-
-  def create_vulnerability!(project_id:, author_id:, title: 'test', severity: 7, confidence: 7, report_type: 0)
-    vulnerabilities.create!(
-      project_id: project_id,
-      author_id: author_id,
-      title: title,
-      severity: severity,
-      confidence: confidence,
-      report_type: report_type
-    )
-  end
-
-  def create_finding!(
-    vulnerability_id:, project_id:, scanner_id:, primary_identifier_id:, location_fingerprint:, uuid:, report_type: 0)
-    vulnerabilities_findings.create!(
-      vulnerability_id: vulnerability_id,
-      project_id: project_id,
-      name: 'test',
-      severity: 7,
-      confidence: 7,
-      report_type: report_type,
-      project_fingerprint: '123qweasdzxc',
-      scanner_id: scanner_id,
-      primary_identifier_id: primary_identifier_id,
-      location_fingerprint: location_fingerprint,
-      metadata_version: 'test',
-      raw_metadata: 'test',
-      uuid: uuid
-    )
-  end
-
-  def create_user!(name: "Example User", email: "user@example.com", user_type: nil)
-    users.create!(
-      name: name,
-      email: email,
-      username: name,
-      projects_limit: 0
-    )
-  end
-end
diff --git a/spec/migrations/20211210140629_encrypt_static_object_token_spec.rb b/spec/migrations/20211210140629_encrypt_static_object_token_spec.rb
deleted file mode 100644
index f103ee54990180f20b99b88c2eb445542b889996..0000000000000000000000000000000000000000
--- a/spec/migrations/20211210140629_encrypt_static_object_token_spec.rb
+++ /dev/null
@@ -1,50 +0,0 @@
-# frozen_string_literal: true
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe EncryptStaticObjectToken, :migration, feature_category: :source_code_management do
-  let!(:background_migration_jobs) { table(:background_migration_jobs) }
-  let!(:users) { table(:users) }
-
-  let!(:user_without_tokens) { create_user!(name: 'notoken') }
-  let!(:user_with_plaintext_token_1) { create_user!(name: 'plaintext_1', token: 'token') }
-  let!(:user_with_plaintext_token_2) { create_user!(name: 'plaintext_2', token: 'TOKEN') }
-  let!(:user_with_encrypted_token) { create_user!(name: 'encrypted', encrypted_token: 'encrypted') }
-  let!(:user_with_both_tokens) { create_user!(name: 'both', token: 'token2', encrypted_token: 'encrypted2') }
-
-  before do
-    stub_const("#{described_class}::BATCH_SIZE", 1)
-  end
-
-  around do |example|
-    freeze_time { Sidekiq::Testing.fake! { example.run } }
-  end
-
-  it 'schedules background migrations' do
-    migrate!
-
-    expect(background_migration_jobs.count).to eq(2)
-    expect(background_migration_jobs.first.arguments).to match_array([user_with_plaintext_token_1.id, user_with_plaintext_token_1.id])
-    expect(background_migration_jobs.second.arguments).to match_array([user_with_plaintext_token_2.id, user_with_plaintext_token_2.id])
-
-    expect(BackgroundMigrationWorker.jobs.size).to eq(2)
-    expect(described_class::MIGRATION).to be_scheduled_delayed_migration(2.minutes, user_with_plaintext_token_1.id, user_with_plaintext_token_1.id)
-    expect(described_class::MIGRATION).to be_scheduled_delayed_migration(4.minutes, user_with_plaintext_token_2.id, user_with_plaintext_token_2.id)
-  end
-
-  private
-
-  def create_user!(name:, token: nil, encrypted_token: nil)
-    email = "#{name}@example.com"
-
-    table(:users).create!(
-      name: name,
-      email: email,
-      username: name,
-      projects_limit: 0,
-      static_object_token: token,
-      static_object_token_encrypted: encrypted_token
-    )
-  end
-end
diff --git a/spec/migrations/20211214012507_backfill_incident_issue_escalation_statuses_spec.rb b/spec/migrations/20211214012507_backfill_incident_issue_escalation_statuses_spec.rb
deleted file mode 100644
index 0df52df43d88409c5abdf1b8bc9395a0973a400c..0000000000000000000000000000000000000000
--- a/spec/migrations/20211214012507_backfill_incident_issue_escalation_statuses_spec.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe BackfillIncidentIssueEscalationStatuses, feature_category: :incident_management do
-  let(:namespaces)  { table(:namespaces) }
-  let(:projects)    { table(:projects) }
-  let(:issues)      { table(:issues) }
-  let(:namespace)   { namespaces.create!(name: 'foo', path: 'foo') }
-  let(:project)     { projects.create!(namespace_id: namespace.id) }
-
-  # Backfill removed - see db/migrate/20220321234317_remove_all_issuable_escalation_statuses.rb.
-  it 'does nothing' do
-    issues.create!(project_id: project.id, issue_type: 1)
-
-    expect { migrate! }.not_to change { BackgroundMigrationWorker.jobs.size }
-  end
-end
diff --git a/spec/migrations/20211217174331_mark_recalculate_finding_signatures_as_completed_spec.rb b/spec/migrations/20211217174331_mark_recalculate_finding_signatures_as_completed_spec.rb
deleted file mode 100644
index 2d808adf578759ead8cf7fb23318f6dd0225565e..0000000000000000000000000000000000000000
--- a/spec/migrations/20211217174331_mark_recalculate_finding_signatures_as_completed_spec.rb
+++ /dev/null
@@ -1,64 +0,0 @@
-# frozen_string_literal: true
-require 'spec_helper'
-require_migration!
-
-def create_background_migration_jobs(ids, status, created_at)
-  proper_status = case status
-                  when :pending
-                    Gitlab::Database::BackgroundMigrationJob.statuses['pending']
-                  when :succeeded
-                    Gitlab::Database::BackgroundMigrationJob.statuses['succeeded']
-                  else
-                    raise ArgumentError
-                  end
-
-  background_migration_jobs.create!(
-    class_name: 'RecalculateVulnerabilitiesOccurrencesUuid',
-    arguments: Array(ids),
-    status: proper_status,
-    created_at: created_at
-  )
-end
-
-RSpec.describe MarkRecalculateFindingSignaturesAsCompleted, :migration, feature_category: :vulnerability_management do
-  let!(:background_migration_jobs) { table(:background_migration_jobs) }
-
-  context 'when RecalculateVulnerabilitiesOccurrencesUuid jobs are present' do
-    before do
-      create_background_migration_jobs([1, 2, 3], :succeeded, DateTime.new(2021, 5, 5, 0, 2))
-      create_background_migration_jobs([4, 5, 6], :pending, DateTime.new(2021, 5, 5, 0, 4))
-
-      create_background_migration_jobs([1, 2, 3], :succeeded, DateTime.new(2021, 8, 18, 0, 0))
-      create_background_migration_jobs([4, 5, 6], :pending, DateTime.new(2021, 8, 18, 0, 2))
-      create_background_migration_jobs([7, 8, 9], :pending, DateTime.new(2021, 8, 18, 0, 4))
-    end
-
-    describe 'gitlab.com' do
-      before do
-        allow(::Gitlab).to receive(:com?).and_return(true)
-      end
-
-      it 'marks all jobs as succeeded' do
-        expect(background_migration_jobs.where(status: 1).count).to eq(2)
-
-        migrate!
-
-        expect(background_migration_jobs.where(status: 1).count).to eq(5)
-      end
-    end
-
-    describe 'self managed' do
-      before do
-        allow(::Gitlab).to receive(:com?).and_return(false)
-      end
-
-      it 'does not change job status' do
-        expect(background_migration_jobs.where(status: 1).count).to eq(2)
-
-        migrate!
-
-        expect(background_migration_jobs.where(status: 1).count).to eq(2)
-      end
-    end
-  end
-end
diff --git a/spec/migrations/20220106111958_add_insert_or_update_vulnerability_reads_trigger_spec.rb b/spec/migrations/20220106111958_add_insert_or_update_vulnerability_reads_trigger_spec.rb
deleted file mode 100644
index 263289462ba5690d3a84ff7d8e711b51c9f36ff2..0000000000000000000000000000000000000000
--- a/spec/migrations/20220106111958_add_insert_or_update_vulnerability_reads_trigger_spec.rb
+++ /dev/null
@@ -1,151 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe AddInsertOrUpdateVulnerabilityReadsTrigger, feature_category: :vulnerability_management do
-  let(:migration) { described_class.new }
-  let(:vulnerabilities) { table(:vulnerabilities) }
-  let(:vulnerability_reads) { table(:vulnerability_reads) }
-  let(:vulnerabilities_findings) { table(:vulnerability_occurrences) }
-  let(:namespace) { table(:namespaces).create!(name: 'user', path: 'user') }
-  let(:user) { table(:users).create!(id: 13, email: 'author@example.com', username: 'author', projects_limit: 10) }
-  let(:project) { table(:projects).create!(id: 123, namespace_id: namespace.id) }
-  let(:scanner) { table(:vulnerability_scanners).create!(project_id: project.id, external_id: 'test 1', name: 'test scanner 1') }
-
-  let(:vulnerability) do
-    create_vulnerability!(
-      project_id: project.id,
-      author_id: user.id
-    )
-  end
-
-  let(:vulnerability2) do
-    create_vulnerability!(
-      project_id: project.id,
-      author_id: user.id
-    )
-  end
-
-  let(:identifier) do
-    table(:vulnerability_identifiers).create!(
-      project_id: project.id,
-      external_type: 'uuid-v5',
-      external_id: 'uuid-v5',
-      fingerprint: '7e394d1b1eb461a7406d7b1e08f057a1cf11287a',
-      name: 'Identifier for UUIDv5')
-  end
-
-  let(:finding) do
-    create_finding!(
-      project_id: project.id,
-      scanner_id: scanner.id,
-      primary_identifier_id: identifier.id
-    )
-  end
-
-  describe '#up' do
-    before do
-      migrate!
-    end
-
-    describe 'UPDATE trigger' do
-      context 'when vulnerability_id is updated' do
-        it 'creates a new vulnerability_reads row' do
-          expect do
-            finding.update!(vulnerability_id: vulnerability.id)
-          end.to change { vulnerability_reads.count }.from(0).to(1)
-        end
-      end
-
-      context 'when vulnerability_id is not updated' do
-        it 'does not create a new vulnerability_reads row' do
-          finding.update!(vulnerability_id: nil)
-
-          expect do
-            finding.update!(location: '')
-          end.not_to change { vulnerability_reads.count }
-        end
-      end
-    end
-
-    describe 'INSERT trigger' do
-      context 'when vulnerability_id is set' do
-        it 'creates a new vulnerability_reads row' do
-          expect do
-            create_finding!(
-              vulnerability_id: vulnerability2.id,
-              project_id: project.id,
-              scanner_id: scanner.id,
-              primary_identifier_id: identifier.id
-            )
-          end.to change { vulnerability_reads.count }.from(0).to(1)
-        end
-      end
-
-      context 'when vulnerability_id is not set' do
-        it 'does not create a new vulnerability_reads row' do
-          expect do
-            create_finding!(
-              project_id: project.id,
-              scanner_id: scanner.id,
-              primary_identifier_id: identifier.id
-            )
-          end.not_to change { vulnerability_reads.count }
-        end
-      end
-    end
-  end
-
-  describe '#down' do
-    before do
-      migration.up
-      migration.down
-    end
-
-    it 'drops the trigger' do
-      expect do
-        finding.update!(vulnerability_id: vulnerability.id)
-      end.not_to change { vulnerability_reads.count }
-    end
-  end
-
-  private
-
-  def create_vulnerability!(project_id:, author_id:, title: 'test', severity: 7, confidence: 7, report_type: 0)
-    vulnerabilities.create!(
-      project_id: project_id,
-      author_id: author_id,
-      title: title,
-      severity: severity,
-      confidence: confidence,
-      report_type: report_type
-    )
-  end
-
-  # rubocop:disable Metrics/ParameterLists
-  def create_finding!(
-    project_id:, scanner_id:, primary_identifier_id:, vulnerability_id: nil,
-    name: "test", severity: 7, confidence: 7, report_type: 0,
-    project_fingerprint: '123qweasdzxc', location: { "image" => "alpine:3.4" }, location_fingerprint: 'test',
-    metadata_version: 'test', raw_metadata: 'test', uuid: SecureRandom.uuid)
-    vulnerabilities_findings.create!(
-      vulnerability_id: vulnerability_id,
-      project_id: project_id,
-      name: name,
-      severity: severity,
-      confidence: confidence,
-      report_type: report_type,
-      project_fingerprint: project_fingerprint,
-      scanner_id: scanner_id,
-      primary_identifier_id: primary_identifier_id,
-      location: location,
-      location_fingerprint: location_fingerprint,
-      metadata_version: metadata_version,
-      raw_metadata: raw_metadata,
-      uuid: uuid
-    )
-  end
-  # rubocop:enable Metrics/ParameterLists
-end
diff --git a/spec/migrations/20220106112043_add_update_vulnerability_reads_trigger_spec.rb b/spec/migrations/20220106112043_add_update_vulnerability_reads_trigger_spec.rb
deleted file mode 100644
index 152a551bc7be033458e5629237c625d8195d4c91..0000000000000000000000000000000000000000
--- a/spec/migrations/20220106112043_add_update_vulnerability_reads_trigger_spec.rb
+++ /dev/null
@@ -1,128 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe AddUpdateVulnerabilityReadsTrigger, feature_category: :vulnerability_management do
-  let(:migration) { described_class.new }
-  let(:vulnerability_reads) { table(:vulnerability_reads) }
-  let(:issue_links) { table(:vulnerability_issue_links) }
-  let(:vulnerabilities) { table(:vulnerabilities) }
-  let(:vulnerabilities_findings) { table(:vulnerability_occurrences) }
-
-  let(:namespace) { table(:namespaces).create!(name: 'user', path: 'user') }
-  let(:user) { table(:users).create!(id: 13, email: 'author@example.com', username: 'author', projects_limit: 10) }
-  let(:project) { table(:projects).create!(id: 123, namespace_id: namespace.id) }
-  let(:issue) { table(:issues).create!(description: '1234', state_id: 1, project_id: project.id) }
-  let(:scanner) { table(:vulnerability_scanners).create!(project_id: project.id, external_id: 'test 1', name: 'test scanner 1') }
-
-  let(:vulnerability) do
-    create_vulnerability!(
-      project_id: project.id,
-      report_type: 7,
-      author_id: user.id
-    )
-  end
-
-  let(:identifier) do
-    table(:vulnerability_identifiers).create!(
-      project_id: project.id,
-      external_type: 'uuid-v5',
-      external_id: 'uuid-v5',
-      fingerprint: '7e394d1b1eb461a7406d7b1e08f057a1cf11287a',
-      name: 'Identifier for UUIDv5')
-  end
-
-  describe '#up' do
-    before do
-      migrate!
-    end
-
-    describe 'UPDATE trigger' do
-      before do
-        create_finding!(
-          vulnerability_id: vulnerability.id,
-          project_id: project.id,
-          scanner_id: scanner.id,
-          report_type: 7,
-          primary_identifier_id: identifier.id
-        )
-      end
-
-      context 'when vulnerability attributes are updated' do
-        it 'updates vulnerability attributes in vulnerability_reads' do
-          expect do
-            vulnerability.update!(severity: 6)
-          end.to change { vulnerability_reads.first.severity }.from(7).to(6)
-        end
-      end
-
-      context 'when vulnerability attributes are not updated' do
-        it 'does not update vulnerability attributes in vulnerability_reads' do
-          expect do
-            vulnerability.update!(title: "New vulnerability")
-          end.not_to change { vulnerability_reads.first }
-        end
-      end
-    end
-  end
-
-  describe '#down' do
-    before do
-      migration.up
-      migration.down
-      create_finding!(
-        vulnerability_id: vulnerability.id,
-        project_id: project.id,
-        scanner_id: scanner.id,
-        report_type: 7,
-        primary_identifier_id: identifier.id
-      )
-    end
-
-    it 'drops the trigger' do
-      expect do
-        vulnerability.update!(severity: 6)
-      end.not_to change { vulnerability_reads.first.severity }
-    end
-  end
-
-  private
-
-  def create_vulnerability!(project_id:, author_id:, title: 'test', severity: 7, confidence: 7, report_type: 0)
-    vulnerabilities.create!(
-      project_id: project_id,
-      author_id: author_id,
-      title: title,
-      severity: severity,
-      confidence: confidence,
-      report_type: report_type
-    )
-  end
-
-  # rubocop:disable Metrics/ParameterLists
-  def create_finding!(
-    project_id:, scanner_id:, primary_identifier_id:, vulnerability_id: nil,
-    name: "test", severity: 7, confidence: 7, report_type: 0,
-    project_fingerprint: '123qweasdzxc', location: { "image" => "alpine:3.4" }, location_fingerprint: 'test',
-    metadata_version: 'test', raw_metadata: 'test', uuid: SecureRandom.uuid)
-    vulnerabilities_findings.create!(
-      vulnerability_id: vulnerability_id,
-      project_id: project_id,
-      name: name,
-      severity: severity,
-      confidence: confidence,
-      report_type: report_type,
-      project_fingerprint: project_fingerprint,
-      scanner_id: scanner_id,
-      primary_identifier_id: primary_identifier_id,
-      location: location,
-      location_fingerprint: location_fingerprint,
-      metadata_version: metadata_version,
-      raw_metadata: raw_metadata,
-      uuid: uuid
-    )
-  end
-  # rubocop:enable Metrics/ParameterLists
-end
diff --git a/spec/migrations/20220106112085_add_update_vulnerability_reads_location_trigger_spec.rb b/spec/migrations/20220106112085_add_update_vulnerability_reads_location_trigger_spec.rb
deleted file mode 100644
index 9fc40b0b5f176c7bc9aaf83e1cdbcc47935a9a27..0000000000000000000000000000000000000000
--- a/spec/migrations/20220106112085_add_update_vulnerability_reads_location_trigger_spec.rb
+++ /dev/null
@@ -1,136 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe AddUpdateVulnerabilityReadsLocationTrigger, feature_category: :vulnerability_management do
-  let(:migration) { described_class.new }
-  let(:vulnerability_reads) { table(:vulnerability_reads) }
-  let(:issue_links) { table(:vulnerability_issue_links) }
-  let(:vulnerabilities) { table(:vulnerabilities) }
-  let(:vulnerabilities_findings) { table(:vulnerability_occurrences) }
-
-  let(:namespace) { table(:namespaces).create!(name: 'user', path: 'user') }
-  let(:user) { table(:users).create!(id: 13, email: 'author@example.com', username: 'author', projects_limit: 10) }
-  let(:project) { table(:projects).create!(id: 123, namespace_id: namespace.id) }
-  let(:issue) { table(:issues).create!(description: '1234', state_id: 1, project_id: project.id) }
-  let(:scanner) { table(:vulnerability_scanners).create!(project_id: project.id, external_id: 'test 1', name: 'test scanner 1') }
-
-  let(:vulnerability) do
-    create_vulnerability!(
-      project_id: project.id,
-      report_type: 7,
-      author_id: user.id
-    )
-  end
-
-  let(:identifier) do
-    table(:vulnerability_identifiers).create!(
-      project_id: project.id,
-      external_type: 'uuid-v5',
-      external_id: 'uuid-v5',
-      fingerprint: '7e394d1b1eb461a7406d7b1e08f057a1cf11287a',
-      name: 'Identifier for UUIDv5')
-  end
-
-  describe '#up' do
-    before do
-      migrate!
-    end
-
-    describe 'UPDATE trigger' do
-      context 'when image is updated' do
-        it 'updates location_image in vulnerability_reads' do
-          finding = create_finding!(
-            vulnerability_id: vulnerability.id,
-            project_id: project.id,
-            scanner_id: scanner.id,
-            report_type: 7,
-            location: { "image" => "alpine:3.4" },
-            primary_identifier_id: identifier.id
-          )
-
-          expect do
-            finding.update!(location: { "image" => "alpine:4", "kubernetes_resource" => { "agent_id" => "1234" } })
-          end.to change { vulnerability_reads.first.location_image }.from("alpine:3.4").to("alpine:4")
-        end
-      end
-
-      context 'when image is not updated' do
-        it 'updates location_image in vulnerability_reads' do
-          finding = create_finding!(
-            vulnerability_id: vulnerability.id,
-            project_id: project.id,
-            scanner_id: scanner.id,
-            report_type: 7,
-            location: { "image" => "alpine:3.4", "kubernetes_resource" => { "agent_id" => "1234" } },
-            primary_identifier_id: identifier.id
-          )
-
-          expect do
-            finding.update!(project_fingerprint: "123qweasdzx")
-          end.not_to change { vulnerability_reads.first.location_image }
-        end
-      end
-    end
-  end
-
-  describe '#down' do
-    before do
-      migration.up
-      migration.down
-    end
-
-    it 'drops the trigger' do
-      finding = create_finding!(
-        vulnerability_id: vulnerability.id,
-        project_id: project.id,
-        scanner_id: scanner.id,
-        primary_identifier_id: identifier.id
-      )
-
-      expect do
-        finding.update!(location: '{"image":"alpine:4"}')
-      end.not_to change { vulnerability_reads.first.location_image }
-    end
-  end
-
-  private
-
-  def create_vulnerability!(project_id:, author_id:, title: 'test', severity: 7, confidence: 7, report_type: 0)
-    vulnerabilities.create!(
-      project_id: project_id,
-      author_id: author_id,
-      title: title,
-      severity: severity,
-      confidence: confidence,
-      report_type: report_type
-    )
-  end
-
-  # rubocop:disable Metrics/ParameterLists
-  def create_finding!(
-    project_id:, scanner_id:, primary_identifier_id:, vulnerability_id: nil,
-    name: "test", severity: 7, confidence: 7, report_type: 0,
-    project_fingerprint: '123qweasdzxc', location: { "image" => "alpine:3.4" }, location_fingerprint: 'test',
-    metadata_version: 'test', raw_metadata: 'test', uuid: SecureRandom.uuid)
-    vulnerabilities_findings.create!(
-      vulnerability_id: vulnerability_id,
-      project_id: project_id,
-      name: name,
-      severity: severity,
-      confidence: confidence,
-      report_type: report_type,
-      project_fingerprint: project_fingerprint,
-      scanner_id: scanner_id,
-      primary_identifier_id: primary_identifier_id,
-      location: location,
-      location_fingerprint: location_fingerprint,
-      metadata_version: metadata_version,
-      raw_metadata: raw_metadata,
-      uuid: uuid
-    )
-  end
-  # rubocop:enable Metrics/ParameterLists
-end
diff --git a/spec/migrations/20220106163326_add_has_issues_on_vulnerability_reads_trigger_spec.rb b/spec/migrations/20220106163326_add_has_issues_on_vulnerability_reads_trigger_spec.rb
deleted file mode 100644
index e58fdfb1591a7c24c0efe06c26b7097828050328..0000000000000000000000000000000000000000
--- a/spec/migrations/20220106163326_add_has_issues_on_vulnerability_reads_trigger_spec.rb
+++ /dev/null
@@ -1,134 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe AddHasIssuesOnVulnerabilityReadsTrigger, feature_category: :vulnerability_management do
-  let(:migration) { described_class.new }
-  let(:vulnerability_reads) { table(:vulnerability_reads) }
-  let(:issue_links) { table(:vulnerability_issue_links) }
-  let(:vulnerabilities) { table(:vulnerabilities) }
-  let(:vulnerabilities_findings) { table(:vulnerability_occurrences) }
-
-  let(:namespace) { table(:namespaces).create!(name: 'user', path: 'user') }
-  let(:user) { table(:users).create!(id: 13, email: 'author@example.com', username: 'author', projects_limit: 10) }
-  let(:project) { table(:projects).create!(id: 123, namespace_id: namespace.id) }
-  let(:issue) { table(:issues).create!(description: '1234', state_id: 1, project_id: project.id) }
-  let(:scanner) { table(:vulnerability_scanners).create!(project_id: project.id, external_id: 'test 1', name: 'test scanner 1') }
-
-  let(:vulnerability) do
-    create_vulnerability!(
-      project_id: project.id,
-      author_id: user.id
-    )
-  end
-
-  let(:identifier) do
-    table(:vulnerability_identifiers).create!(
-      project_id: project.id,
-      external_type: 'uuid-v5',
-      external_id: 'uuid-v5',
-      fingerprint: '7e394d1b1eb461a7406d7b1e08f057a1cf11287a',
-      name: 'Identifier for UUIDv5')
-  end
-
-  before do
-    create_finding!(
-      vulnerability_id: vulnerability.id,
-      project_id: project.id,
-      scanner_id: scanner.id,
-      primary_identifier_id: identifier.id
-    )
-
-    @vulnerability_read = vulnerability_reads.first
-  end
-
-  describe '#up' do
-    before do
-      migrate!
-    end
-
-    describe 'INSERT trigger' do
-      it 'updates has_issues in vulnerability_reads' do
-        expect do
-          issue_links.create!(vulnerability_id: vulnerability.id, issue_id: issue.id)
-        end.to change { @vulnerability_read.reload.has_issues }.from(false).to(true)
-      end
-    end
-
-    describe 'DELETE trigger' do
-      let(:issue2) { table(:issues).create!(description: '1234', state_id: 1, project_id: project.id) }
-
-      it 'does not change has_issues when there exists another issue' do
-        issue_link1 = issue_links.create!(vulnerability_id: vulnerability.id, issue_id: issue.id)
-        issue_links.create!(vulnerability_id: vulnerability.id, issue_id: issue2.id)
-
-        expect do
-          issue_link1.delete
-        end.not_to change { @vulnerability_read.reload.has_issues }
-      end
-
-      it 'unsets has_issues when all issues are deleted' do
-        issue_link1 = issue_links.create!(vulnerability_id: vulnerability.id, issue_id: issue.id)
-        issue_link2 = issue_links.create!(vulnerability_id: vulnerability.id, issue_id: issue2.id)
-
-        expect do
-          issue_link1.delete
-          issue_link2.delete
-        end.to change { @vulnerability_read.reload.has_issues }.from(true).to(false)
-      end
-    end
-  end
-
-  describe '#down' do
-    before do
-      migration.up
-      migration.down
-    end
-
-    it 'drops the trigger' do
-      expect do
-        issue_links.create!(vulnerability_id: vulnerability.id, issue_id: issue.id)
-      end.not_to change { @vulnerability_read.has_issues }
-    end
-  end
-
-  private
-
-  def create_vulnerability!(project_id:, author_id:, title: 'test', severity: 7, confidence: 7, report_type: 0)
-    vulnerabilities.create!(
-      project_id: project_id,
-      author_id: author_id,
-      title: title,
-      severity: severity,
-      confidence: confidence,
-      report_type: report_type
-    )
-  end
-
-  # rubocop:disable Metrics/ParameterLists
-  def create_finding!(
-    project_id:, scanner_id:, primary_identifier_id:, vulnerability_id: nil,
-    name: "test", severity: 7, confidence: 7, report_type: 0,
-    project_fingerprint: '123qweasdzxc', location: { "image" => "alpine:3.4" }, location_fingerprint: 'test',
-    metadata_version: 'test', raw_metadata: 'test', uuid: SecureRandom.uuid)
-    vulnerabilities_findings.create!(
-      vulnerability_id: vulnerability_id,
-      project_id: project_id,
-      name: name,
-      severity: severity,
-      confidence: confidence,
-      report_type: report_type,
-      project_fingerprint: project_fingerprint,
-      scanner_id: scanner_id,
-      primary_identifier_id: primary_identifier_id,
-      location: location,
-      location_fingerprint: location_fingerprint,
-      metadata_version: metadata_version,
-      raw_metadata: raw_metadata,
-      uuid: uuid
-    )
-  end
-  # rubocop:enable Metrics/ParameterLists
-end
diff --git a/spec/migrations/20220107064845_populate_vulnerability_reads_spec.rb b/spec/migrations/20220107064845_populate_vulnerability_reads_spec.rb
deleted file mode 100644
index 1338f826537d2c295f093176a5645554e623797c..0000000000000000000000000000000000000000
--- a/spec/migrations/20220107064845_populate_vulnerability_reads_spec.rb
+++ /dev/null
@@ -1,106 +0,0 @@
-# frozen_string_literal: true
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe PopulateVulnerabilityReads, :migration, feature_category: :vulnerability_management do
-  let!(:namespace) { table(:namespaces).create!(name: 'user', path: 'user') }
-  let!(:user) { table(:users).create!(email: 'author@example.com', username: 'author', projects_limit: 10) }
-  let!(:project) { table(:projects).create!(namespace_id: namespace.id) }
-  let!(:scanner) { table(:vulnerability_scanners).create!(project_id: project.id, external_id: 'test 1', name: 'test scanner 1') }
-  let!(:background_migration_jobs) { table(:background_migration_jobs) }
-  let!(:vulnerabilities) { table(:vulnerabilities) }
-  let!(:vulnerability_reads) { table(:vulnerability_reads) }
-  let!(:vulnerabilities_findings) { table(:vulnerability_occurrences) }
-  let!(:vulnerability_issue_links) { table(:vulnerability_issue_links) }
-  let!(:vulnerability_ids) { [] }
-
-  before do
-    stub_const("#{described_class}::BATCH_SIZE", 1)
-    stub_const("#{described_class}::SUB_BATCH_SIZE", 1)
-
-    5.times.each do |x|
-      vulnerability = create_vulnerability!(
-        project_id: project.id,
-        report_type: 7,
-        author_id: user.id
-      )
-      identifier = table(:vulnerability_identifiers).create!(
-        project_id: project.id,
-        external_type: 'uuid-v5',
-        external_id: 'uuid-v5',
-        fingerprint: Digest::SHA1.hexdigest(vulnerability.id.to_s),
-        name: 'Identifier for UUIDv5')
-
-      create_finding!(
-        vulnerability_id: vulnerability.id,
-        project_id: project.id,
-        scanner_id: scanner.id,
-        primary_identifier_id: identifier.id
-      )
-
-      vulnerability_ids << vulnerability.id
-    end
-  end
-
-  around do |example|
-    freeze_time { Sidekiq::Testing.fake! { example.run } }
-  end
-
-  it 'schedules background migrations' do
-    migrate!
-
-    expect(background_migration_jobs.count).to eq(5)
-    expect(background_migration_jobs.first.arguments).to match_array([vulnerability_ids.first, vulnerability_ids.first, 1])
-    expect(background_migration_jobs.second.arguments).to match_array([vulnerability_ids.second, vulnerability_ids.second, 1])
-    expect(background_migration_jobs.third.arguments).to match_array([vulnerability_ids.third, vulnerability_ids.third, 1])
-    expect(background_migration_jobs.fourth.arguments).to match_array([vulnerability_ids.fourth, vulnerability_ids.fourth, 1])
-    expect(background_migration_jobs.fifth.arguments).to match_array([vulnerability_ids.fifth, vulnerability_ids.fifth, 1])
-
-    expect(BackgroundMigrationWorker.jobs.size).to eq(5)
-    expect(described_class::MIGRATION_NAME).to be_scheduled_delayed_migration(2.minutes, vulnerability_ids.first, vulnerability_ids.first, 1)
-    expect(described_class::MIGRATION_NAME).to be_scheduled_delayed_migration(4.minutes, vulnerability_ids.second, vulnerability_ids.second, 1)
-    expect(described_class::MIGRATION_NAME).to be_scheduled_delayed_migration(6.minutes, vulnerability_ids.third, vulnerability_ids.third, 1)
-    expect(described_class::MIGRATION_NAME).to be_scheduled_delayed_migration(8.minutes, vulnerability_ids.fourth, vulnerability_ids.fourth, 1)
-    expect(described_class::MIGRATION_NAME).to be_scheduled_delayed_migration(10.minutes, vulnerability_ids.fifth, vulnerability_ids.fifth, 1)
-  end
-
-  private
-
-  def create_vulnerability!(project_id:, author_id:, title: 'test', severity: 7, confidence: 7, report_type: 0)
-    vulnerabilities.create!(
-      project_id: project_id,
-      author_id: author_id,
-      title: title,
-      severity: severity,
-      confidence: confidence,
-      report_type: report_type
-    )
-  end
-
-  # rubocop:disable Metrics/ParameterLists
-  def create_finding!(
-    vulnerability_id:, project_id:, scanner_id:, primary_identifier_id:, id: nil,
-    name: "test", severity: 7, confidence: 7, report_type: 0,
-    project_fingerprint: '123qweasdzxc', location_fingerprint: 'test',
-    metadata_version: 'test', raw_metadata: 'test', uuid: SecureRandom.uuid)
-    params = {
-      vulnerability_id: vulnerability_id,
-      project_id: project_id,
-      name: name,
-      severity: severity,
-      confidence: confidence,
-      report_type: report_type,
-      project_fingerprint: project_fingerprint,
-      scanner_id: scanner_id,
-      primary_identifier_id: primary_identifier_id,
-      location_fingerprint: location_fingerprint,
-      metadata_version: metadata_version,
-      raw_metadata: raw_metadata,
-      uuid: uuid
-    }
-    params[:id] = id unless id.nil?
-    vulnerabilities_findings.create!(params)
-  end
-  # rubocop:enable Metrics/ParameterLists
-end
diff --git a/spec/migrations/20220120094340_drop_position_from_security_findings_spec.rb b/spec/migrations/20220120094340_drop_position_from_security_findings_spec.rb
deleted file mode 100644
index 1470f2b3cad6393d834f0c5ae25ac665d65d451c..0000000000000000000000000000000000000000
--- a/spec/migrations/20220120094340_drop_position_from_security_findings_spec.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!('drop_position_from_security_findings')
-
-RSpec.describe DropPositionFromSecurityFindings, feature_category: :vulnerability_management do
-  let(:events) { table(:security_findings) }
-
-  it 'correctly migrates up and down' do
-    reversible_migration do |migration|
-      migration.before -> {
-        expect(events.column_names).to include('position')
-      }
-
-      migration.after -> {
-        events.reset_column_information
-        expect(events.column_names).not_to include('position')
-      }
-    end
-  end
-end
diff --git a/spec/migrations/20220124130028_dedup_runner_projects_spec.rb b/spec/migrations/20220124130028_dedup_runner_projects_spec.rb
deleted file mode 100644
index b9189cbae7f7752f2da00e4957463534fbd32a09..0000000000000000000000000000000000000000
--- a/spec/migrations/20220124130028_dedup_runner_projects_spec.rb
+++ /dev/null
@@ -1,66 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe DedupRunnerProjects, :migration, :suppress_gitlab_schemas_validate_connection,
-  schema: 20220120085655, feature_category: :runner do
-  let(:namespaces) { table(:namespaces) }
-  let(:projects) { table(:projects) }
-  let(:runners) { table(:ci_runners) }
-  let(:runner_projects) { table(:ci_runner_projects) }
-
-  let!(:namespace) { namespaces.create!(name: 'foo', path: 'foo') }
-  let!(:project) { projects.create!(namespace_id: namespace.id) }
-  let!(:project_2) { projects.create!(namespace_id: namespace.id) }
-  let!(:runner) { runners.create!(runner_type: 'project_type') }
-  let!(:runner_2) { runners.create!(runner_type: 'project_type') }
-  let!(:runner_3) { runners.create!(runner_type: 'project_type') }
-
-  let!(:duplicated_runner_project_1) { runner_projects.create!(runner_id: runner.id, project_id: project.id) }
-  let!(:duplicated_runner_project_2) { runner_projects.create!(runner_id: runner.id, project_id: project.id) }
-  let!(:duplicated_runner_project_3) { runner_projects.create!(runner_id: runner_2.id, project_id: project_2.id) }
-  let!(:duplicated_runner_project_4) { runner_projects.create!(runner_id: runner_2.id, project_id: project_2.id) }
-
-  let!(:non_duplicated_runner_project) { runner_projects.create!(runner_id: runner_3.id, project_id: project.id) }
-
-  it 'deduplicates ci_runner_projects table' do
-    expect { migrate! }.to change { runner_projects.count }.from(5).to(3)
-  end
-
-  it 'merges `duplicated_runner_project_1` with `duplicated_runner_project_2`', :aggregate_failures do
-    migrate!
-
-    expect(runner_projects.where(id: duplicated_runner_project_1.id)).not_to(exist)
-
-    merged_runner_projects = runner_projects.find_by(id: duplicated_runner_project_2.id)
-
-    expect(merged_runner_projects).to be_present
-    expect(merged_runner_projects.created_at).to be_like_time(duplicated_runner_project_1.created_at)
-    expect(merged_runner_projects.created_at).to be_like_time(duplicated_runner_project_2.created_at)
-  end
-
-  it 'merges `duplicated_runner_project_3` with `duplicated_runner_project_4`', :aggregate_failures do
-    migrate!
-
-    expect(runner_projects.where(id: duplicated_runner_project_3.id)).not_to(exist)
-
-    merged_runner_projects = runner_projects.find_by(id: duplicated_runner_project_4.id)
-
-    expect(merged_runner_projects).to be_present
-    expect(merged_runner_projects.created_at).to be_like_time(duplicated_runner_project_3.created_at)
-    expect(merged_runner_projects.created_at).to be_like_time(duplicated_runner_project_4.created_at)
-  end
-
-  it 'does not change non duplicated records' do
-    expect { migrate! }.not_to change { non_duplicated_runner_project.reload.attributes }
-  end
-
-  it 'does nothing when there are no runner projects' do
-    runner_projects.delete_all
-
-    migrate!
-
-    expect(runner_projects.count).to eq(0)
-  end
-end
diff --git a/spec/migrations/20220128155251_remove_dangling_running_builds_spec.rb b/spec/migrations/20220128155251_remove_dangling_running_builds_spec.rb
deleted file mode 100644
index 3abe173196f270f22e7873c5a5f078d9119624f5..0000000000000000000000000000000000000000
--- a/spec/migrations/20220128155251_remove_dangling_running_builds_spec.rb
+++ /dev/null
@@ -1,53 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!('remove_dangling_running_builds')
-
-RSpec.describe RemoveDanglingRunningBuilds, :suppress_gitlab_schemas_validate_connection,
-  feature_category: :continuous_integration do
-  let(:namespace) { table(:namespaces).create!(name: 'user', path: 'user') }
-  let(:project) { table(:projects).create!(namespace_id: namespace.id) }
-  let(:runner) { table(:ci_runners).create!(runner_type: 1) }
-  let(:builds) { table(:ci_builds) }
-  let(:running_builds) { table(:ci_running_builds) }
-
-  let(:running_build) do
-    builds.create!(
-      name: 'test 1',
-      status: 'running',
-      project_id: project.id,
-      type: 'Ci::Build')
-  end
-
-  let(:failed_build) do
-    builds.create!(
-      name: 'test 2',
-      status: 'failed',
-      project_id: project.id,
-      type: 'Ci::Build')
-  end
-
-  let!(:running_metadata) do
-    running_builds.create!(
-      build_id: running_build.id,
-      project_id: project.id,
-      runner_id: runner.id,
-      runner_type:
-      runner.runner_type)
-  end
-
-  let!(:failed_metadata) do
-    running_builds.create!(
-      build_id: failed_build.id,
-      project_id: project.id,
-      runner_id: runner.id,
-      runner_type: runner.runner_type)
-  end
-
-  it 'removes failed builds' do
-    migrate!
-
-    expect(running_metadata.reload).to be_present
-    expect { failed_metadata.reload }.to raise_error(ActiveRecord::RecordNotFound)
-  end
-end
diff --git a/spec/migrations/20220128155814_fix_approval_rules_code_owners_rule_type_index_spec.rb b/spec/migrations/20220128155814_fix_approval_rules_code_owners_rule_type_index_spec.rb
deleted file mode 100644
index 3f3fdd0889d4a838f6c29fe75f3b9335b87ee311..0000000000000000000000000000000000000000
--- a/spec/migrations/20220128155814_fix_approval_rules_code_owners_rule_type_index_spec.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!('fix_approval_rules_code_owners_rule_type_index')
-
-RSpec.describe FixApprovalRulesCodeOwnersRuleTypeIndex, :migration, feature_category: :source_code_management do
-  let(:table_name) { :approval_merge_request_rules }
-  let(:index_name) { 'index_approval_rules_code_owners_rule_type' }
-
-  it 'correctly migrates up and down' do
-    reversible_migration do |migration|
-      migration.before -> {
-        expect(subject.index_exists_by_name?(table_name, index_name)).to be_truthy
-      }
-
-      migration.after -> {
-        expect(subject.index_exists_by_name?(table_name, index_name)).to be_truthy
-      }
-    end
-  end
-
-  context 'when the index already exists' do
-    before do
-      subject.add_concurrent_index table_name, :merge_request_id, where: 'rule_type = 2', name: index_name
-    end
-
-    it 'keeps the index' do
-      migrate!
-
-      expect(subject.index_exists_by_name?(table_name, index_name)).to be_truthy
-    end
-  end
-end
diff --git a/spec/migrations/20220202105733_delete_service_template_records_spec.rb b/spec/migrations/20220202105733_delete_service_template_records_spec.rb
deleted file mode 100644
index 41762a3a5c311356bf64b4181f36a7c364ca9875..0000000000000000000000000000000000000000
--- a/spec/migrations/20220202105733_delete_service_template_records_spec.rb
+++ /dev/null
@@ -1,42 +0,0 @@
-# frozen_string_literal: true
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe DeleteServiceTemplateRecords, feature_category: :integrations do
-  let(:integrations) { table(:integrations) }
-  let(:chat_names) { table(:chat_names) }
-  let(:web_hooks) { table(:web_hooks) }
-  let(:slack_integrations) { table(:slack_integrations) }
-  let(:zentao_tracker_data) { table(:zentao_tracker_data) }
-  let(:jira_tracker_data) { table(:jira_tracker_data) }
-  let(:issue_tracker_data) { table(:issue_tracker_data) }
-
-  before do
-    template = integrations.create!(template: true)
-    chat_names.create!(service_id: template.id, user_id: 1, team_id: 1, chat_id: 1)
-    web_hooks.create!(service_id: template.id)
-    slack_integrations.create!(service_id: template.id, team_id: 1, team_name: 'team', alias: 'alias', user_id: 1)
-    zentao_tracker_data.create!(integration_id: template.id)
-    jira_tracker_data.create!(service_id: template.id)
-    issue_tracker_data.create!(service_id: template.id)
-
-    integrations.create!(template: false)
-  end
-
-  it 'deletes template records and associated data' do
-    expect { migrate! }
-      .to change { integrations.where(template: true).count }.from(1).to(0)
-      .and change { chat_names.count }.from(1).to(0)
-      .and change { web_hooks.count }.from(1).to(0)
-      .and change { slack_integrations.count }.from(1).to(0)
-      .and change { zentao_tracker_data.count }.from(1).to(0)
-      .and change { jira_tracker_data.count }.from(1).to(0)
-      .and change { issue_tracker_data.count }.from(1).to(0)
-  end
-
-  it 'does not delete non template records' do
-    expect { migrate! }
-      .not_to change { integrations.where(template: false).count }
-  end
-end
diff --git a/spec/migrations/20220204095121_backfill_namespace_statistics_with_dependency_proxy_size_spec.rb b/spec/migrations/20220204095121_backfill_namespace_statistics_with_dependency_proxy_size_spec.rb
deleted file mode 100644
index cbae5674d78d0f888fe7c8d4b0a96a9752f58297..0000000000000000000000000000000000000000
--- a/spec/migrations/20220204095121_backfill_namespace_statistics_with_dependency_proxy_size_spec.rb
+++ /dev/null
@@ -1,64 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe BackfillNamespaceStatisticsWithDependencyProxySize, feature_category: :dependency_proxy do
-  let!(:groups) { table(:namespaces) }
-  let!(:group1) { groups.create!(id: 10, name: 'test1', path: 'test1', type: 'Group') }
-  let!(:group2) { groups.create!(id: 20, name: 'test2', path: 'test2', type: 'Group') }
-  let!(:group3) { groups.create!(id: 30, name: 'test3', path: 'test3', type: 'Group') }
-  let!(:group4) { groups.create!(id: 40, name: 'test4', path: 'test4', type: 'Group') }
-
-  let!(:dependency_proxy_blobs) { table(:dependency_proxy_blobs) }
-  let!(:dependency_proxy_manifests) { table(:dependency_proxy_manifests) }
-
-  let!(:group1_manifest) { create_manifest(10, 10) }
-  let!(:group2_manifest) { create_manifest(20, 20) }
-  let!(:group3_manifest) { create_manifest(30, 30) }
-
-  let!(:group1_blob) { create_blob(10, 10) }
-  let!(:group2_blob) { create_blob(20, 20) }
-  let!(:group3_blob) { create_blob(30, 30) }
-
-  describe '#up' do
-    it 'correctly schedules background migrations' do
-      stub_const("#{described_class}::BATCH_SIZE", 2)
-
-      Sidekiq::Testing.fake! do
-        freeze_time do
-          migrate!
-
-          aggregate_failures do
-            expect(described_class::MIGRATION)
-              .to be_scheduled_migration([10, 30], ['dependency_proxy_size'])
-
-            expect(described_class::MIGRATION)
-              .to be_scheduled_delayed_migration(2.minutes, [20], ['dependency_proxy_size'])
-
-            expect(BackgroundMigrationWorker.jobs.size).to eq(2)
-          end
-        end
-      end
-    end
-  end
-
-  def create_manifest(group_id, size)
-    dependency_proxy_manifests.create!(
-      group_id: group_id,
-      size: size,
-      file_name: 'test-file',
-      file: 'test',
-      digest: 'abc123'
-    )
-  end
-
-  def create_blob(group_id, size)
-    dependency_proxy_blobs.create!(
-      group_id: group_id,
-      size: size,
-      file_name: 'test-file',
-      file: 'test'
-    )
-  end
-end
diff --git a/spec/migrations/20220204194347_encrypt_integration_properties_spec.rb b/spec/migrations/20220204194347_encrypt_integration_properties_spec.rb
deleted file mode 100644
index 5e728bb396ce7773a3ccc25ec1ddfeb52861e762..0000000000000000000000000000000000000000
--- a/spec/migrations/20220204194347_encrypt_integration_properties_spec.rb
+++ /dev/null
@@ -1,40 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe EncryptIntegrationProperties, :migration, schema: 20220204193000, feature_category: :integrations do
-  subject(:migration) { described_class.new }
-
-  let(:integrations) { table(:integrations) }
-
-  before do
-    stub_const("#{described_class.name}::BATCH_SIZE", 2)
-  end
-
-  it 'correctly schedules background migrations', :aggregate_failures do
-    # update required
-    record1 = integrations.create!(properties: some_props)
-    record2 = integrations.create!(properties: some_props)
-    record3 = integrations.create!(properties: some_props)
-    record4 = integrations.create!(properties: nil)
-    record5 = integrations.create!(properties: nil)
-
-    Sidekiq::Testing.fake! do
-      freeze_time do
-        migrate!
-
-        expect(described_class::MIGRATION).to be_scheduled_migration(record1.id, record2.id)
-        expect(described_class::MIGRATION).to be_scheduled_migration(record3.id, record4.id)
-        expect(described_class::MIGRATION).to be_scheduled_migration(record5.id, record5.id)
-
-        expect(BackgroundMigrationWorker.jobs.size).to eq(3)
-      end
-    end
-  end
-
-  def some_props
-    { iid: generate(:iid), url: generate(:url), username: generate(:username) }.to_json
-  end
-end
diff --git a/spec/migrations/20220208080921_schedule_migrate_personal_namespace_project_maintainer_to_owner_spec.rb b/spec/migrations/20220208080921_schedule_migrate_personal_namespace_project_maintainer_to_owner_spec.rb
deleted file mode 100644
index 3de9d992413112f6eec5c218f69b839ae8ae9409..0000000000000000000000000000000000000000
--- a/spec/migrations/20220208080921_schedule_migrate_personal_namespace_project_maintainer_to_owner_spec.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe ScheduleMigratePersonalNamespaceProjectMaintainerToOwner, feature_category: :groups_and_projects do
-  let!(:migration) { described_class::MIGRATION }
-
-  describe '#up' do
-    it 'schedules background jobs for each batch of members' do
-      migrate!
-
-      expect(migration).to have_scheduled_batched_migration(
-        table_name: :members,
-        column_name: :id,
-        interval: described_class::INTERVAL
-      )
-    end
-  end
-end
diff --git a/spec/migrations/20220211214605_update_integrations_trigger_type_new_on_insert_null_safe_spec.rb b/spec/migrations/20220211214605_update_integrations_trigger_type_new_on_insert_null_safe_spec.rb
deleted file mode 100644
index 8a6a542bc5ec7fb55df771b0e4b0a9689cd2df39..0000000000000000000000000000000000000000
--- a/spec/migrations/20220211214605_update_integrations_trigger_type_new_on_insert_null_safe_spec.rb
+++ /dev/null
@@ -1,37 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe UpdateIntegrationsTriggerTypeNewOnInsertNullSafe, :migration, feature_category: :integrations do
-  let(:integrations) { table(:integrations) }
-
-  before do
-    migrate!
-  end
-
-  it 'leaves defined values alone' do
-    record = integrations.create!(type: 'XService', type_new: 'Integrations::Y')
-
-    expect(integrations.find(record.id)).to have_attributes(type: 'XService', type_new: 'Integrations::Y')
-  end
-
-  it 'keeps type_new synchronized with type' do
-    record = integrations.create!(type: 'AbcService', type_new: nil)
-
-    expect(integrations.find(record.id)).to have_attributes(
-      type: 'AbcService',
-      type_new: 'Integrations::Abc'
-    )
-  end
-
-  it 'keeps type synchronized with type_new' do
-    record = integrations.create!(type: nil, type_new: 'Integrations::Abc')
-
-    expect(integrations.find(record.id)).to have_attributes(
-      type: 'AbcService',
-      type_new: 'Integrations::Abc'
-    )
-  end
-end
diff --git a/spec/migrations/20220213103859_remove_integrations_type_spec.rb b/spec/migrations/20220213103859_remove_integrations_type_spec.rb
deleted file mode 100644
index 8f6d9b0d9b52a8db8939eed7e1ba5cbffd3e2514..0000000000000000000000000000000000000000
--- a/spec/migrations/20220213103859_remove_integrations_type_spec.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe RemoveIntegrationsType, :migration, feature_category: :integrations do
-  subject(:migration) { described_class.new }
-
-  let(:integrations) { table(:integrations) }
-  let(:bg_migration) { instance_double(bg_migration_class) }
-
-  before do
-    stub_const("#{described_class.name}::BATCH_SIZE", 2)
-  end
-
-  it 'performs remaining background migrations', :aggregate_failures do
-    # Already migrated
-    integrations.create!(type: 'SlackService', type_new: 'Integrations::Slack')
-    # update required
-    record1 = integrations.create!(type: 'SlackService')
-    record2 = integrations.create!(type: 'JiraService')
-    record3 = integrations.create!(type: 'SlackService')
-
-    migrate!
-
-    expect(record1.reload.type_new).to eq 'Integrations::Slack'
-    expect(record2.reload.type_new).to eq 'Integrations::Jira'
-    expect(record3.reload.type_new).to eq 'Integrations::Slack'
-  end
-end
diff --git a/spec/migrations/20220222192524_create_not_null_constraint_releases_tag_spec.rb b/spec/migrations/20220222192524_create_not_null_constraint_releases_tag_spec.rb
deleted file mode 100644
index b8a37dcd6d98dd1bd45e9b318f59ff3204666729..0000000000000000000000000000000000000000
--- a/spec/migrations/20220222192524_create_not_null_constraint_releases_tag_spec.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: true
-require 'spec_helper'
-require_migration!
-
-RSpec.describe CreateNotNullConstraintReleasesTag, feature_category: :release_orchestration do
-  let!(:releases) { table(:releases) }
-  let!(:migration) { described_class.new }
-
-  before do
-    allow(migration).to receive(:transaction_open?).and_return(false)
-    allow(migration).to receive(:with_lock_retries).and_yield
-  end
-
-  it 'adds a check constraint to tags' do
-    constraint = releases.connection.check_constraints(:releases).find { |constraint| constraint.expression == "tag IS NOT NULL" }
-    expect(constraint).to be_nil
-
-    migration.up
-
-    constraint = releases.connection.check_constraints(:releases).find { |constraint| constraint.expression == "tag IS NOT NULL" }
-    expect(constraint).to be_a(ActiveRecord::ConnectionAdapters::CheckConstraintDefinition)
-  end
-end
diff --git a/spec/migrations/20220222192525_remove_null_releases_spec.rb b/spec/migrations/20220222192525_remove_null_releases_spec.rb
deleted file mode 100644
index ce42dea077dee45536fd0b1954e95679f2335721..0000000000000000000000000000000000000000
--- a/spec/migrations/20220222192525_remove_null_releases_spec.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe RemoveNullReleases, feature_category: :release_orchestration do
-  let(:releases) { table(:releases) }
-
-  before do
-    # we need to migrate to before previous migration so an invalid record can be created
-    migrate!
-    migration_context.down(previous_migration(3).version)
-
-    releases.create!(tag: 'good', name: 'good release', released_at: Time.now)
-    releases.create!(tag: nil, name: 'bad release', released_at: Time.now)
-  end
-
-  it 'deletes template records and associated data' do
-    expect { migrate! }
-      .to change { releases.count }.from(2).to(1)
-  end
-end
diff --git a/spec/migrations/20220223124428_schedule_merge_topics_with_same_name_spec.rb b/spec/migrations/20220223124428_schedule_merge_topics_with_same_name_spec.rb
deleted file mode 100644
index 0347dd8b88dba57da7b936b3e95e4bba95beb61c..0000000000000000000000000000000000000000
--- a/spec/migrations/20220223124428_schedule_merge_topics_with_same_name_spec.rb
+++ /dev/null
@@ -1,36 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe ScheduleMergeTopicsWithSameName, feature_category: :groups_and_projects do
-  let(:topics) { table(:topics) }
-
-  describe '#up' do
-    before do
-      stub_const("#{described_class}::BATCH_SIZE", 2)
-
-      topics.create!(name: 'topic1')
-      topics.create!(name: 'Topic2')
-      topics.create!(name: 'Topic3')
-      topics.create!(name: 'Topic4')
-      topics.create!(name: 'topic2')
-      topics.create!(name: 'topic3')
-      topics.create!(name: 'topic4')
-      topics.create!(name: 'TOPIC2')
-      topics.create!(name: 'topic5')
-    end
-
-    it 'schedules MergeTopicsWithSameName background jobs', :aggregate_failures do
-      Sidekiq::Testing.fake! do
-        freeze_time do
-          migrate!
-
-          expect(described_class::MIGRATION).to be_scheduled_delayed_migration(2.minutes, %w[topic2 topic3])
-          expect(described_class::MIGRATION).to be_scheduled_delayed_migration(4.minutes, %w[topic4])
-          expect(BackgroundMigrationWorker.jobs.size).to eq(2)
-        end
-      end
-    end
-  end
-end
diff --git a/spec/migrations/20220305223212_add_security_training_providers_spec.rb b/spec/migrations/20220305223212_add_security_training_providers_spec.rb
deleted file mode 100644
index f67db3b68cde9927e7b58b2ec4f5823536dab55e..0000000000000000000000000000000000000000
--- a/spec/migrations/20220305223212_add_security_training_providers_spec.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe AddSecurityTrainingProviders, :migration, feature_category: :vulnerability_management do
-  include MigrationHelpers::WorkItemTypesHelper
-
-  let!(:security_training_providers) { table(:security_training_providers) }
-
-  it 'creates default data' do
-    # Need to delete all as security training providers are seeded before entire test suite
-    security_training_providers.delete_all
-
-    reversible_migration do |migration|
-      migration.before -> {
-        expect(security_training_providers.count).to eq(0)
-      }
-
-      migration.after -> {
-        expect(security_training_providers.count).to eq(2)
-      }
-    end
-  end
-end
diff --git a/spec/migrations/20220307192610_remove_duplicate_project_tag_releases_spec.rb b/spec/migrations/20220307192610_remove_duplicate_project_tag_releases_spec.rb
deleted file mode 100644
index 98e2ba4816b568b8fee98195482711f60d18f8f0..0000000000000000000000000000000000000000
--- a/spec/migrations/20220307192610_remove_duplicate_project_tag_releases_spec.rb
+++ /dev/null
@@ -1,45 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe RemoveDuplicateProjectTagReleases, feature_category: :release_orchestration do
-  let(:namespaces) { table(:namespaces) }
-  let(:projects) { table(:projects) }
-  let(:users) { table(:users) }
-  let(:releases) { table(:releases) }
-
-  let(:namespace) { namespaces.create!(name: 'gitlab', path: 'gitlab-org') }
-  let(:project) { projects.create!(namespace_id: namespace.id, name: 'foo') }
-
-  let(:dup_releases) do
-    Array.new(4).fill do |i|
-      rel = releases.new(project_id: project.id, tag: "duplicate tag", released_at: (DateTime.now + i.days))
-      rel.save!(validate: false)
-      rel
-    end
-  end
-
-  let(:valid_release) do
-    releases.create!(
-      project_id: project.id,
-      tag: "valid tag",
-      released_at: DateTime.now
-    )
-  end
-
-  describe '#up' do
-    it "correctly removes duplicate tags from the same project" do
-      expect(dup_releases.length).to eq 4
-      expect(valid_release).not_to be nil
-      expect(releases.where(tag: 'duplicate tag').count).to eq 4
-      expect(releases.where(tag: 'valid tag').count).to eq 1
-
-      migrate!
-
-      expect(releases.where(tag: 'duplicate tag').count).to eq 1
-      expect(releases.where(tag: 'valid tag').count).to eq 1
-      expect(releases.all.map(&:tag)).to match_array ['valid tag', 'duplicate tag']
-    end
-  end
-end
diff --git a/spec/migrations/20220309084954_remove_leftover_external_pull_request_deletions_spec.rb b/spec/migrations/20220309084954_remove_leftover_external_pull_request_deletions_spec.rb
deleted file mode 100644
index 8df9907643eddfda6f479742f405f2b38a7e2cbd..0000000000000000000000000000000000000000
--- a/spec/migrations/20220309084954_remove_leftover_external_pull_request_deletions_spec.rb
+++ /dev/null
@@ -1,43 +0,0 @@
-# frozen_string_literal: true
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe RemoveLeftoverExternalPullRequestDeletions, feature_category: :cell do
-  let(:deleted_records) { table(:loose_foreign_keys_deleted_records) }
-
-  let(:pending_record1) { deleted_records.create!(id: 1, fully_qualified_table_name: 'public.external_pull_requests', primary_key_value: 1, status: 1) }
-  let(:pending_record2) { deleted_records.create!(id: 2, fully_qualified_table_name: 'public.external_pull_requests', primary_key_value: 2, status: 1) }
-  let(:other_pending_record1) { deleted_records.create!(id: 3, fully_qualified_table_name: 'public.projects', primary_key_value: 1, status: 1) }
-  let(:other_pending_record2) { deleted_records.create!(id: 4, fully_qualified_table_name: 'public.ci_builds', primary_key_value: 1, status: 1) }
-  let(:processed_record1) { deleted_records.create!(id: 5, fully_qualified_table_name: 'public.external_pull_requests', primary_key_value: 3, status: 2) }
-  let(:other_processed_record1) { deleted_records.create!(id: 6, fully_qualified_table_name: 'public.ci_builds', primary_key_value: 2, status: 2) }
-
-  let!(:persisted_ids_before) do
-    [
-      pending_record1,
-      pending_record2,
-      other_pending_record1,
-      other_pending_record2,
-      processed_record1,
-      other_processed_record1
-    ].map(&:id).sort
-  end
-
-  let!(:persisted_ids_after) do
-    [
-      other_pending_record1,
-      other_pending_record2,
-      processed_record1,
-      other_processed_record1
-    ].map(&:id).sort
-  end
-
-  def all_ids
-    deleted_records.all.map(&:id).sort
-  end
-
-  it 'deletes pending external_pull_requests records' do
-    expect { migrate! }.to change { all_ids }.from(persisted_ids_before).to(persisted_ids_after)
-  end
-end
diff --git a/spec/migrations/20220310141349_remove_dependency_list_usage_data_from_redis_spec.rb b/spec/migrations/20220310141349_remove_dependency_list_usage_data_from_redis_spec.rb
deleted file mode 100644
index 5d9be79e76894db0de14ec273e2814c1f3566e73..0000000000000000000000000000000000000000
--- a/spec/migrations/20220310141349_remove_dependency_list_usage_data_from_redis_spec.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe RemoveDependencyListUsageDataFromRedis, :migration, :clean_gitlab_redis_shared_state,
-  feature_category: :dependency_management do
-  let(:key) { "DEPENDENCY_LIST_USAGE_COUNTER" }
-
-  describe "#up" do
-    it 'removes the hash from redis' do
-      with_redis do |redis|
-        redis.hincrby(key, 1, 1)
-        redis.hincrby(key, 2, 1)
-      end
-
-      expect { migrate! }.to change { with_redis { |r| r.hgetall(key) } }.from({ '1' => '1', '2' => '1' }).to({})
-    end
-  end
-
-  def with_redis(&block)
-    Gitlab::Redis::SharedState.with(&block)
-  end
-end
diff --git a/spec/migrations/20220315171129_cleanup_draft_data_from_faulty_regex_spec.rb b/spec/migrations/20220315171129_cleanup_draft_data_from_faulty_regex_spec.rb
deleted file mode 100644
index 85fe3d712a2eab5682a1b8dc46304707aec50ab8..0000000000000000000000000000000000000000
--- a/spec/migrations/20220315171129_cleanup_draft_data_from_faulty_regex_spec.rb
+++ /dev/null
@@ -1,40 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe CleanupDraftDataFromFaultyRegex, feature_category: :code_review_workflow do
-  let(:merge_requests) { table(:merge_requests) }
-
-  let!(:namespace) { table(:namespaces).create!(name: 'namespace', path: 'namespace') }
-  let!(:project) { table(:projects).create!(namespace_id: namespace.id) }
-
-  let(:default_mr_values) do
-    {
-      target_project_id: project.id,
-      draft: true,
-      source_branch: 'master',
-      target_branch: 'feature'
-    }
-  end
-
-  let!(:known_good_1) { merge_requests.create!(default_mr_values.merge(title: "Draft: Test Title")) }
-  let!(:known_good_2) { merge_requests.create!(default_mr_values.merge(title: "WIP: Test Title")) }
-  let!(:known_bad_1) { merge_requests.create!(default_mr_values.merge(title: "Known bad title drafts")) }
-  let!(:known_bad_2) { merge_requests.create!(default_mr_values.merge(title: "Known bad title wip")) }
-
-  describe '#up' do
-    it 'schedules CleanupDraftDataFromFaultyRegex background jobs filtering for eligble MRs' do
-      stub_const("#{described_class}::BATCH_SIZE", 2)
-      allow(Gitlab).to receive(:com?).and_return(true)
-
-      freeze_time do
-        migrate!
-
-        expect(described_class::MIGRATION).to be_scheduled_delayed_migration(5.minutes, known_bad_1.id, known_bad_2.id)
-
-        expect(BackgroundMigrationWorker.jobs.size).to eq(1)
-      end
-    end
-  end
-end
diff --git a/spec/migrations/20220316202640_populate_container_repositories_migration_plan_spec.rb b/spec/migrations/20220316202640_populate_container_repositories_migration_plan_spec.rb
deleted file mode 100644
index 16ebbf8b0041648c85228477e85009a25ec4df9c..0000000000000000000000000000000000000000
--- a/spec/migrations/20220316202640_populate_container_repositories_migration_plan_spec.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe PopulateContainerRepositoriesMigrationPlan, :aggregate_failures, feature_category: :container_registry do
-  let!(:namespaces) { table(:namespaces) }
-  let!(:projects) { table(:projects) }
-  let!(:container_repositories) { table(:container_repositories) }
-
-  let!(:namespace) { namespaces.create!(id: 1, name: 'namespace', path: 'namespace') }
-  let!(:project) { projects.create!(id: 1, name: 'project', path: 'project', namespace_id: 1) }
-  let!(:container_repository1) { container_repositories.create!(name: 'container_repository1', project_id: 1) }
-  let!(:container_repository2) { container_repositories.create!(name: 'container_repository2', project_id: 1) }
-  let!(:container_repository3) { container_repositories.create!(name: 'container_repository3', project_id: 1) }
-
-  before do
-    stub_const("#{described_class.name}::BATCH_SIZE", 2)
-  end
-
-  it 'schedules jobs for container_repositories to populate migration_state' do
-    Sidekiq::Testing.fake! do
-      freeze_time do
-        migrate!
-
-        expect(described_class::MIGRATION).to be_scheduled_delayed_migration(
-          2.minutes, container_repository1.id, container_repository2.id)
-        expect(described_class::MIGRATION).to be_scheduled_delayed_migration(
-          4.minutes, container_repository3.id, container_repository3.id)
-        expect(BackgroundMigrationWorker.jobs.size).to eq(2)
-      end
-    end
-  end
-end
diff --git a/spec/migrations/20220321234317_remove_all_issuable_escalation_statuses_spec.rb b/spec/migrations/20220321234317_remove_all_issuable_escalation_statuses_spec.rb
deleted file mode 100644
index c645a7689691e9267770a67a6470355406868411..0000000000000000000000000000000000000000
--- a/spec/migrations/20220321234317_remove_all_issuable_escalation_statuses_spec.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe RemoveAllIssuableEscalationStatuses, feature_category: :incident_management do
-  let(:namespaces)  { table(:namespaces) }
-  let(:projects)    { table(:projects) }
-  let(:issues)      { table(:issues) }
-  let(:statuses)    { table(:incident_management_issuable_escalation_statuses) }
-  let(:namespace)   { namespaces.create!(name: 'foo', path: 'foo') }
-  let(:project)     { projects.create!(namespace_id: namespace.id) }
-
-  it 'removes all escalation status records' do
-    issue = issues.create!(project_id: project.id, issue_type: 1)
-    statuses.create!(issue_id: issue.id)
-
-    expect { migrate! }.to change(statuses, :count).from(1).to(0)
-  end
-end
diff --git a/spec/migrations/20220322132242_update_pages_onboarding_state_spec.rb b/spec/migrations/20220322132242_update_pages_onboarding_state_spec.rb
deleted file mode 100644
index 6b08b4f853d15856eea7e717e10af319c5d4e8c7..0000000000000000000000000000000000000000
--- a/spec/migrations/20220322132242_update_pages_onboarding_state_spec.rb
+++ /dev/null
@@ -1,53 +0,0 @@
-# frozen_string_literal: true
-require 'spec_helper'
-require_migration!
-
-RSpec.describe UpdatePagesOnboardingState, feature_category: :pages do
-  let(:migration) { described_class.new }
-  let!(:namespaces) { table(:namespaces) }
-  let!(:projects) { table(:projects) }
-  let!(:project_pages_metadata) { table(:project_pages_metadata) }
-
-  let!(:namespace1) { namespaces.create!(name: 'foo', path: 'foo') }
-  let!(:namespace2) { namespaces.create!(name: 'bar', path: 'bar') }
-  let!(:project1) { projects.create!(namespace_id: namespace1.id) }
-  let!(:project2) { projects.create!(namespace_id: namespace2.id) }
-  let!(:pages_metadata1) do
-    project_pages_metadata.create!(
-      project_id: project1.id,
-      deployed: true,
-      onboarding_complete: false
-    )
-  end
-
-  let!(:pages_metadata2) do
-    project_pages_metadata.create!(
-      project_id: project2.id,
-      deployed: false,
-      onboarding_complete: false
-    )
-  end
-
-  describe '#up' do
-    before do
-      migration.up
-    end
-
-    it 'sets the onboarding_complete attribute to the value of deployed' do
-      expect(pages_metadata1.reload.onboarding_complete).to eq(true)
-      expect(pages_metadata2.reload.onboarding_complete).to eq(false)
-    end
-  end
-
-  describe '#down' do
-    before do
-      migration.up
-      migration.down
-    end
-
-    it 'sets all onboarding_complete attributes to false' do
-      expect(pages_metadata1.reload.onboarding_complete).to eq(false)
-      expect(pages_metadata2.reload.onboarding_complete).to eq(false)
-    end
-  end
-end
diff --git a/spec/migrations/20220324032250_migrate_shimo_confluence_service_category_spec.rb b/spec/migrations/20220324032250_migrate_shimo_confluence_service_category_spec.rb
deleted file mode 100644
index 6f9e70aa8c854362628484e06aca8ed60e21c009..0000000000000000000000000000000000000000
--- a/spec/migrations/20220324032250_migrate_shimo_confluence_service_category_spec.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe MigrateShimoConfluenceServiceCategory, :migration, feature_category: :integrations do
-  let(:namespaces) { table(:namespaces) }
-  let(:projects) { table(:projects) }
-  let(:integrations) { table(:integrations) }
-
-  before do
-    namespace = namespaces.create!(name: 'test', path: 'test')
-    projects.create!(id: 1, namespace_id: namespace.id, name: 'gitlab', path: 'gitlab')
-    integrations.create!(
-      id: 1, active: true, type_new: "Integrations::SlackSlashCommands", category: 'chat', project_id: 1
-    )
-    integrations.create!(id: 3, active: true, type_new: "Integrations::Confluence", category: 'common', project_id: 1)
-    integrations.create!(id: 5, active: true, type_new: "Integrations::Shimo", category: 'common', project_id: 1)
-  end
-
-  describe '#up' do
-    it 'correctly schedules background migrations', :aggregate_failures do
-      stub_const("#{described_class.name}::BATCH_SIZE", 2)
-
-      Sidekiq::Testing.fake! do
-        freeze_time do
-          migrate!
-
-          expect(described_class::MIGRATION).to be_scheduled_migration(3, 5)
-          expect(BackgroundMigrationWorker.jobs.size).to eq(1)
-        end
-      end
-    end
-  end
-end
diff --git a/spec/migrations/20220324165436_schedule_backfill_project_settings_spec.rb b/spec/migrations/20220324165436_schedule_backfill_project_settings_spec.rb
deleted file mode 100644
index 82187f71ceb93af81cafbd8711e33e70b7e25a41..0000000000000000000000000000000000000000
--- a/spec/migrations/20220324165436_schedule_backfill_project_settings_spec.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe ScheduleBackfillProjectSettings, feature_category: :groups_and_projects do
-  let!(:migration) { described_class::MIGRATION }
-
-  describe '#up' do
-    it 'schedules background jobs for each batch of projects' do
-      migrate!
-
-      expect(migration).to(
-        have_scheduled_batched_migration(
-          table_name: :projects,
-          column_name: :id,
-          interval: described_class::INTERVAL
-        )
-      )
-    end
-  end
-end
diff --git a/spec/migrations/20220329175119_remove_leftover_ci_job_artifact_deletions_spec.rb b/spec/migrations/20220329175119_remove_leftover_ci_job_artifact_deletions_spec.rb
deleted file mode 100644
index ca2ee6d8aba89cade3209d8ff9942ba5184647bc..0000000000000000000000000000000000000000
--- a/spec/migrations/20220329175119_remove_leftover_ci_job_artifact_deletions_spec.rb
+++ /dev/null
@@ -1,92 +0,0 @@
-# frozen_string_literal: true
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe RemoveLeftoverCiJobArtifactDeletions, feature_category: :cell do
-  let(:deleted_records) { table(:loose_foreign_keys_deleted_records) }
-
-  target_table_name = Ci::JobArtifact.table_name
-
-  let(:pending_record1) do
-    deleted_records.create!(
-      id: 1,
-      fully_qualified_table_name: "public.#{target_table_name}",
-      primary_key_value: 1,
-      status: 1
-    )
-  end
-
-  let(:pending_record2) do
-    deleted_records.create!(
-      id: 2,
-      fully_qualified_table_name: "public.#{target_table_name}",
-      primary_key_value: 2,
-      status: 1
-    )
-  end
-
-  let(:other_pending_record1) do
-    deleted_records.create!(
-      id: 3,
-      fully_qualified_table_name: 'public.projects',
-      primary_key_value: 1,
-      status: 1
-    )
-  end
-
-  let(:other_pending_record2) do
-    deleted_records.create!(
-      id: 4,
-      fully_qualified_table_name: 'public.ci_builds',
-      primary_key_value: 1,
-      status: 1
-    )
-  end
-
-  let(:processed_record1) do
-    deleted_records.create!(
-      id: 5,
-      fully_qualified_table_name: 'public.external_pull_requests',
-      primary_key_value: 3,
-      status: 2
-    )
-  end
-
-  let(:other_processed_record1) do
-    deleted_records.create!(
-      id: 6,
-      fully_qualified_table_name: 'public.ci_builds',
-      primary_key_value: 2,
-      status: 2
-    )
-  end
-
-  let!(:persisted_ids_before) do
-    [
-      pending_record1,
-      pending_record2,
-      other_pending_record1,
-      other_pending_record2,
-      processed_record1,
-      other_processed_record1
-    ].map(&:id).sort
-  end
-
-  let!(:persisted_ids_after) do
-    [
-      other_pending_record1,
-      other_pending_record2,
-      processed_record1,
-      other_processed_record1
-    ].map(&:id).sort
-  end
-
-  def all_ids
-    deleted_records.all.map(&:id).sort
-  end
-
-  it 'deletes pending external_pull_requests records' do
-    expect { migrate! }.to change { all_ids }.from(persisted_ids_before).to(persisted_ids_after)
-  end
-end
diff --git a/spec/migrations/20220331133802_schedule_backfill_topics_title_spec.rb b/spec/migrations/20220331133802_schedule_backfill_topics_title_spec.rb
deleted file mode 100644
index 0b6252ffb5337276aec24b8e2261101c0413caee..0000000000000000000000000000000000000000
--- a/spec/migrations/20220331133802_schedule_backfill_topics_title_spec.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe ScheduleBackfillTopicsTitle, feature_category: :groups_and_projects do
-  let(:topics) { table(:topics) }
-
-  let!(:topic1) { topics.create!(name: 'topic1') }
-  let!(:topic2) { topics.create!(name: 'topic2') }
-  let!(:topic3) { topics.create!(name: 'topic3') }
-
-  it 'correctly schedules background migrations', :aggregate_failures do
-    stub_const("#{Gitlab::Database::Migrations::BackgroundMigrationHelpers}::BATCH_SIZE", 2)
-
-    Sidekiq::Testing.fake! do
-      freeze_time do
-        migrate!
-
-        expect(described_class::MIGRATION).to be_scheduled_delayed_migration(2.minutes, topic1.id, topic2.id)
-        expect(described_class::MIGRATION).to be_scheduled_delayed_migration(4.minutes, topic3.id, topic3.id)
-        expect(BackgroundMigrationWorker.jobs.size).to eq(2)
-      end
-    end
-  end
-end
diff --git a/spec/migrations/20220412143552_consume_remaining_encrypt_integration_property_jobs_spec.rb b/spec/migrations/20220412143552_consume_remaining_encrypt_integration_property_jobs_spec.rb
deleted file mode 100644
index 77bf80621c4e6ebaa9562629559c051802e9553f..0000000000000000000000000000000000000000
--- a/spec/migrations/20220412143552_consume_remaining_encrypt_integration_property_jobs_spec.rb
+++ /dev/null
@@ -1,42 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe ConsumeRemainingEncryptIntegrationPropertyJobs, :migration, feature_category: :integrations do
-  subject(:migration) { described_class.new }
-
-  let(:integrations) { table(:integrations) }
-  let(:bg_migration_class) { ::Gitlab::BackgroundMigration::EncryptIntegrationProperties }
-  let(:bg_migration) { instance_double(bg_migration_class) }
-
-  before do
-    stub_const("#{described_class.name}::BATCH_SIZE", 2)
-  end
-
-  it 'performs remaining background migrations', :aggregate_failures do
-    # Already migrated
-    integrations.create!(properties: some_props, encrypted_properties: 'abc')
-    integrations.create!(properties: some_props, encrypted_properties: 'def')
-    integrations.create!(properties: some_props, encrypted_properties: 'xyz')
-    # update required
-    record1 = integrations.create!(properties: some_props)
-    record2 = integrations.create!(properties: some_props)
-    record3 = integrations.create!(properties: some_props)
-    # No update required
-    integrations.create!(properties: nil)
-    integrations.create!(properties: nil)
-
-    expect(Gitlab::BackgroundMigration).to receive(:steal).with(bg_migration_class.name.demodulize)
-    expect(bg_migration_class).to receive(:new).twice.and_return(bg_migration)
-    expect(bg_migration).to receive(:perform).with(record1.id, record2.id)
-    expect(bg_migration).to receive(:perform).with(record3.id, record3.id)
-
-    migrate!
-  end
-
-  def some_props
-    { iid: generate(:iid), url: generate(:url), username: generate(:username) }.to_json
-  end
-end
diff --git a/spec/migrations/20220416054011_schedule_backfill_project_member_namespace_id_spec.rb b/spec/migrations/20220416054011_schedule_backfill_project_member_namespace_id_spec.rb
deleted file mode 100644
index 019d17d5fc364a844170b1fed1e0c4bd6570401b..0000000000000000000000000000000000000000
--- a/spec/migrations/20220416054011_schedule_backfill_project_member_namespace_id_spec.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe ScheduleBackfillProjectMemberNamespaceId, feature_category: :groups_and_projects do
-  let!(:migration) { described_class::MIGRATION }
-
-  describe '#up' do
-    it 'schedules background jobs for each batch of project members' do
-      migrate!
-
-      expect(migration).to have_scheduled_batched_migration(
-        table_name: :members,
-        column_name: :id,
-        interval: described_class::INTERVAL
-      )
-    end
-  end
-
-  describe '#down' do
-    it 'deletes all batched migration records' do
-      migrate!
-      schema_migrate_down!
-
-      expect(migration).not_to have_scheduled_batched_migration
-    end
-  end
-end
diff --git a/spec/migrations/20220420135946_update_batched_background_migration_arguments_spec.rb b/spec/migrations/20220420135946_update_batched_background_migration_arguments_spec.rb
deleted file mode 100644
index c740c893ad6d81f577ea18c994bf4180c473fb22..0000000000000000000000000000000000000000
--- a/spec/migrations/20220420135946_update_batched_background_migration_arguments_spec.rb
+++ /dev/null
@@ -1,44 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe UpdateBatchedBackgroundMigrationArguments, feature_category: :database do
-  let(:batched_migrations) { table(:batched_background_migrations) }
-
-  before do
-    common_attributes = {
-      max_value: 10,
-      batch_size: 5,
-      sub_batch_size: 2,
-      interval: 2.minutes,
-      table_name: 'events',
-      column_name: 'id'
-    }
-
-    batched_migrations.create!(common_attributes.merge(job_class_name: 'Job1', job_arguments: '[]'))
-    batched_migrations.create!(common_attributes.merge(job_class_name: 'Job2', job_arguments: '["some_argument"]'))
-    batched_migrations.create!(common_attributes.merge(job_class_name: 'Job3', job_arguments: '[]'))
-  end
-
-  describe '#up' do
-    it 'updates batched migration arguments to have an empty jsonb array' do
-      expect { migrate! }
-        .to change { batched_migrations.where("job_arguments = '[]'").count }.from(0).to(2)
-        .and change { batched_migrations.where("job_arguments = '\"[]\"'").count }.from(2).to(0)
-    end
-  end
-
-  describe '#down' do
-    before do
-      migrate!
-    end
-
-    it 'reverts batched migration arguments to have the previous default' do
-      expect { schema_migrate_down! }
-        .to change { batched_migrations.where("job_arguments = '\"[]\"'").count }.from(0).to(2)
-        .and change { batched_migrations.where("job_arguments = '[]'").count }.from(2).to(0)
-    end
-  end
-end
diff --git a/spec/migrations/20220426185933_backfill_deployments_finished_at_spec.rb b/spec/migrations/20220426185933_backfill_deployments_finished_at_spec.rb
deleted file mode 100644
index c41e1402bf1393a207b13ff37cfe8aef7108295c..0000000000000000000000000000000000000000
--- a/spec/migrations/20220426185933_backfill_deployments_finished_at_spec.rb
+++ /dev/null
@@ -1,73 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe BackfillDeploymentsFinishedAt, :migration, feature_category: :continuous_delivery do
-  let(:deployments) { table(:deployments) }
-  let(:namespaces) { table(:namespaces) }
-
-  let(:namespace) { namespaces.create!(name: 'user', path: 'user') }
-  let(:project_namespace) { namespaces.create!(name: 'project', path: 'project', type: 'Project') }
-  let(:project) { table(:projects).create!(namespace_id: namespace.id, project_namespace_id: project_namespace.id) }
-  let(:environment) { table(:environments).create!(name: 'production', slug: 'production', project_id: project.id) }
-
-  describe '#up' do
-    context 'when a deployment row does not have a value for finished_at' do
-      context 'and deployment succeeded' do
-        before do
-          create_deployment!(status: described_class::DEPLOYMENT_STATUS_SUCCESS, finished_at: nil)
-        end
-
-        it 'copies created_at to finished_at' do
-          expect { migrate! }
-            .to change { deployments.last.finished_at }.from(nil).to(deployments.last.created_at)
-            .and not_change { deployments.last.created_at }
-        end
-      end
-
-      context 'and deployment does not have status: success' do
-        before do
-          create_deployment!(status: 0, finished_at: nil)
-          create_deployment!(status: 1, finished_at: nil)
-          create_deployment!(status: 3, finished_at: nil)
-          create_deployment!(status: 4, finished_at: nil)
-          create_deployment!(status: 5, finished_at: nil)
-          create_deployment!(status: 6, finished_at: nil)
-        end
-
-        it 'does not fill finished_at' do
-          expect { migrate! }.to not_change { deployments.where(finished_at: nil).count }
-        end
-      end
-    end
-
-    context 'when a deployment row has value for finished_at' do
-      let(:finished_at) { '2018-10-30 11:12:02 UTC' }
-
-      before do
-        create_deployment!(status: described_class::DEPLOYMENT_STATUS_SUCCESS, finished_at: finished_at)
-      end
-
-      it 'does not affect existing value' do
-        expect { migrate! }
-          .to not_change { deployments.last.finished_at }
-          .and not_change { deployments.last.created_at }
-      end
-    end
-  end
-
-  def create_deployment!(status:, finished_at:)
-    deployments.create!(
-      environment_id: environment.id,
-      project_id: project.id,
-      ref: 'master',
-      tag: false,
-      sha: 'x',
-      status: status,
-      iid: deployments.count + 1,
-      finished_at: finished_at
-    )
-  end
-end
diff --git a/spec/migrations/20220502015011_clean_up_fix_merge_request_diff_commit_users_spec.rb b/spec/migrations/20220502015011_clean_up_fix_merge_request_diff_commit_users_spec.rb
deleted file mode 100644
index 47d407618d252ea559b1188f70c518816d15275f..0000000000000000000000000000000000000000
--- a/spec/migrations/20220502015011_clean_up_fix_merge_request_diff_commit_users_spec.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration! 'clean_up_fix_merge_request_diff_commit_users'
-
-RSpec.describe CleanUpFixMergeRequestDiffCommitUsers, :migration, feature_category: :code_review_workflow do
-  let(:namespaces) { table(:namespaces) }
-  let(:projects) { table(:projects) }
-  let(:project_namespace) { namespaces.create!(name: 'project2', path: 'project2', type: 'Project') }
-  let(:namespace) { namespaces.create!(name: 'foo', path: 'foo') }
-
-  describe '#up' do
-    it 'finalizes the background migration' do
-      expect(described_class).to be_finalize_background_migration_of('FixMergeRequestDiffCommitUsers')
-
-      migrate!
-    end
-  end
-end
diff --git a/spec/migrations/20220502173045_reset_too_many_tags_skipped_registry_imports_spec.rb b/spec/migrations/20220502173045_reset_too_many_tags_skipped_registry_imports_spec.rb
deleted file mode 100644
index a65e991d566b971fa0206ffb9658be0f9c786062..0000000000000000000000000000000000000000
--- a/spec/migrations/20220502173045_reset_too_many_tags_skipped_registry_imports_spec.rb
+++ /dev/null
@@ -1,68 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe ResetTooManyTagsSkippedRegistryImports, :aggregate_failures, feature_category: :container_registry do
-  let(:migration) { described_class::MIGRATION }
-  let(:namespaces) { table(:namespaces) }
-  let(:projects) { table(:projects) }
-  let(:container_repositories) { table(:container_repositories) }
-
-  let!(:namespace) { namespaces.create!(id: 1, name: 'namespace', path: 'namespace') }
-  let!(:project) { projects.create!(id: 1, name: 'project', path: 'project', project_namespace_id: 1, namespace_id: 1) }
-
-  let!(:container_repository1) do
-    container_repositories.create!(
-      name: 'container_repository1',
-      project_id: 1,
-      migration_state: 'import_skipped',
-      migration_skipped_reason: 2
-    )
-  end
-
-  let!(:container_repository2) do
-    container_repositories.create!(
-      name: 'container_repository2',
-      project_id: 1,
-      migration_state: 'import_skipped',
-      migration_skipped_reason: 2
-    )
-  end
-
-  let!(:container_repository3) do
-    container_repositories.create!(
-      name: 'container_repository3',
-      project_id: 1,
-      migration_state: 'import_skipped',
-      migration_skipped_reason: 2
-    )
-  end
-
-  # this should not qualify for the migration
-  let!(:container_repository4) do
-    container_repositories.create!(
-      name: 'container_repository4',
-      project_id: 1,
-      migration_state: 'default'
-    )
-  end
-
-  before do
-    stub_const("#{described_class.name}::BATCH_SIZE", 2)
-  end
-
-  it 'schedules jobs to reset skipped registry imports' do
-    Sidekiq::Testing.fake! do
-      freeze_time do
-        migrate!
-
-        expect(migration).to be_scheduled_delayed_migration(
-          2.minutes, container_repository1.id, container_repository2.id)
-        expect(migration).to be_scheduled_delayed_migration(
-          4.minutes, container_repository3.id, container_repository3.id)
-        expect(BackgroundMigrationWorker.jobs.size).to eq(2)
-      end
-    end
-  end
-end
diff --git a/spec/migrations/20220503035221_add_gitlab_schema_to_batched_background_migrations_spec.rb b/spec/migrations/20220503035221_add_gitlab_schema_to_batched_background_migrations_spec.rb
deleted file mode 100644
index 9086700c513b4b99d2958e807c9417029eb8e53a..0000000000000000000000000000000000000000
--- a/spec/migrations/20220503035221_add_gitlab_schema_to_batched_background_migrations_spec.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe AddGitlabSchemaToBatchedBackgroundMigrations, feature_category: :database do
-  it 'sets gitlab_schema for existing methods to "gitlab_main" and default to NULL' do
-    batched_migrations = table(:batched_background_migrations)
-    batched_migration = batched_migrations.create!(
-      id: 1, created_at: Time.now, updated_at: Time.now,
-      max_value: 100, batch_size: 100, sub_batch_size: 10, interval: 120,
-      job_class_name: 'TestJob', table_name: '_test', column_name: 'id'
-    )
-
-    reversible_migration do |migration|
-      migration.before -> {
-        batched_migrations.reset_column_information
-        column = batched_migrations.columns.find { |column| column.name == 'gitlab_schema' }
-
-        expect(column).to be_nil
-      }
-
-      migration.after -> {
-        expect(batched_migration.reload.gitlab_schema).to eq('gitlab_main')
-
-        batched_migrations.reset_column_information
-        column = batched_migrations.columns.find { |column| column.name == 'gitlab_schema' }
-
-        expect(column).to be
-        expect(column.default).to be_nil
-      }
-    end
-  end
-end
diff --git a/spec/migrations/20220505044348_fix_automatic_iterations_cadences_start_date_spec.rb b/spec/migrations/20220505044348_fix_automatic_iterations_cadences_start_date_spec.rb
deleted file mode 100644
index 16258eeb0fbff327b328e0f0d5065f68eb41fd15..0000000000000000000000000000000000000000
--- a/spec/migrations/20220505044348_fix_automatic_iterations_cadences_start_date_spec.rb
+++ /dev/null
@@ -1,63 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe FixAutomaticIterationsCadencesStartDate, feature_category: :team_planning do
-  let(:migration) { described_class.new }
-  let(:namespaces) { table(:namespaces) }
-  let(:sprints) { table(:sprints) }
-  let(:iterations_cadences) { table(:iterations_cadences) }
-
-  let!(:group1) { namespaces.create!(name: 'abc', path: 'abc') }
-  let!(:group2) { namespaces.create!(name: 'def', path: 'def') }
-
-  let(:jan2022) { Date.new(2022, 1, 1) }
-  let(:feb2022) { Date.new(2022, 2, 1) }
-  let(:may2022) { Date.new(2022, 5, 1) }
-  let(:dec2022) { Date.new(2022, 12, 1) }
-
-  let!(:cadence1) { iterations_cadences.create!(start_date: jan2022, title: "ic 1", group_id: group1.id) }
-  let!(:cadence2) { iterations_cadences.create!(start_date: may2022, group_id: group1.id, title: "ic 2") }
-  let!(:cadence3) do
-    iterations_cadences.create!(start_date: jan2022, automatic: false, group_id: group2.id, title: "ic 3 (invalid)")
-  end
-
-  let!(:cadence4) { iterations_cadences.create!(start_date: jan2022, group_id: group2.id, title: "ic 4 (invalid)") }
-
-  before do
-    sprints.create!(id: 2, start_date: jan2022, due_date: jan2022 + 1.week, iterations_cadence_id: cadence1.id,
-      group_id: group1.id, iid: 1)
-    sprints.create!(id: 1, start_date: dec2022, due_date: dec2022 + 1.week, iterations_cadence_id: cadence1.id,
-      group_id: group1.id, iid: 2)
-
-    sprints.create!(id: 4, start_date: feb2022, due_date: feb2022 + 1.week, iterations_cadence_id: cadence3.id,
-      group_id: group2.id, iid: 1)
-    sprints.create!(id: 3, start_date: may2022, due_date: may2022 + 1.week, iterations_cadence_id: cadence3.id,
-      group_id: group2.id, iid: 2)
-
-    sprints.create!(id: 5, start_date: may2022, due_date: may2022 + 1.week, iterations_cadence_id: cadence4.id,
-      group_id: group2.id, iid: 4)
-    sprints.create!(id: 6, start_date: feb2022, due_date: feb2022 + 1.week, iterations_cadence_id: cadence4.id,
-      group_id: group2.id, iid: 3)
-  end
-
-  describe '#up' do
-    it "updates automatic iterations_cadence records to use start dates of their earliest sprint records" do
-      migrate!
-
-      # This cadence has a valid start date. Its start date should be left as it is
-      expect(cadence1.reload.start_date).to eq jan2022
-
-      # This cadence doesn't have an iteration. Its start date should be left as it is.
-      expect(cadence2.reload.start_date).to eq may2022
-
-      # This cadence has an invalid start date but it isn't automatic. Its start date should be left as it is.
-      expect(cadence3.reload.start_date).to eq jan2022
-
-      # This cadence has an invalid start date. Its start date should be fixed.
-      expect(cadence4.reload.start_date).to eq feb2022
-    end
-  end
-end
diff --git a/spec/migrations/20220505174658_update_index_on_alerts_to_exclude_null_fingerprints_spec.rb b/spec/migrations/20220505174658_update_index_on_alerts_to_exclude_null_fingerprints_spec.rb
deleted file mode 100644
index 255d99eb8cae62554a952f30b86bbf043313554d..0000000000000000000000000000000000000000
--- a/spec/migrations/20220505174658_update_index_on_alerts_to_exclude_null_fingerprints_spec.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe UpdateIndexOnAlertsToExcludeNullFingerprints, feature_category: :incident_management do
-  let(:alerts) { 'alert_management_alerts' }
-  let(:old_index) { described_class::OLD_INDEX_NAME }
-  let(:new_index) { described_class::NEW_INDEX_NAME }
-
-  it 'correctly migrates up and down' do
-    reversible_migration do |migration|
-      migration.before -> {
-        expect(subject.index_exists_by_name?(alerts, old_index)).to be_truthy
-        expect(subject.index_exists_by_name?(alerts, new_index)).to be_falsey
-      }
-
-      migration.after -> {
-        expect(subject.index_exists_by_name?(alerts, old_index)).to be_falsey
-        expect(subject.index_exists_by_name?(alerts, new_index)).to be_truthy
-      }
-    end
-  end
-end
diff --git a/spec/migrations/20220506154054_create_sync_namespace_details_trigger_spec.rb b/spec/migrations/20220506154054_create_sync_namespace_details_trigger_spec.rb
deleted file mode 100644
index cc3867455479f9682e1aa61e045b43ea9665a80c..0000000000000000000000000000000000000000
--- a/spec/migrations/20220506154054_create_sync_namespace_details_trigger_spec.rb
+++ /dev/null
@@ -1,76 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe CreateSyncNamespaceDetailsTrigger, feature_category: :groups_and_projects do
-  let(:migration) { described_class.new }
-  let(:namespaces) { table(:namespaces) }
-  let(:namespace_details) { table(:namespace_details) }
-  let!(:timestamp) { Time.new(2020, 01, 01).utc }
-
-  let(:synced_attributes) do
-    {
-      description: 'description',
-      description_html: '<p>description</p>',
-      cached_markdown_version: 1966080,
-      created_at: timestamp,
-      updated_at: timestamp
-    }
-  end
-
-  let(:other_attributes) do
-    {
-      name: 'name',
-      path: 'path'
-    }
-  end
-
-  let(:attributes) { other_attributes.merge(synced_attributes) }
-
-  describe '#up' do
-    before do
-      migrate!
-    end
-
-    describe 'INSERT trigger' do
-      it 'creates a namespace_detail record' do
-        expect do
-          namespaces.create!(attributes)
-        end.to change(namespace_details, :count).by(1)
-      end
-
-      it 'the created namespace_details record has matching attributes' do
-        namespaces.create!(attributes)
-        synced_namespace_details = namespace_details.last
-
-        expect(synced_namespace_details).to have_attributes(synced_attributes)
-      end
-    end
-
-    describe 'UPDATE trigger' do
-      let!(:namespace) { namespaces.create!(attributes) }
-
-      it 'updates the attribute in the synced namespace_details record' do
-        namespace.update!(description: 'new_description')
-
-        synced_namespace_details = namespace_details.last
-        expect(synced_namespace_details.description).to eq('new_description')
-      end
-    end
-  end
-
-  describe '#down' do
-    before do
-      migration.up
-      migration.down
-    end
-
-    it 'drops the trigger' do
-      expect do
-        namespaces.create!(attributes)
-      end.not_to change(namespace_details, :count)
-    end
-  end
-end
diff --git a/spec/migrations/20220512190659_remove_web_hooks_web_hook_logs_web_hook_id_fk_spec.rb b/spec/migrations/20220512190659_remove_web_hooks_web_hook_logs_web_hook_id_fk_spec.rb
deleted file mode 100644
index 76dedfd6fafa50e5f8bf1590bf3142b73854de3f..0000000000000000000000000000000000000000
--- a/spec/migrations/20220512190659_remove_web_hooks_web_hook_logs_web_hook_id_fk_spec.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe RemoveWebHooksWebHookLogsWebHookIdFk, feature_category: :webhooks do
-  let(:web_hooks) { table(:web_hooks) }
-  let(:logs) { table(:web_hook_logs) }
-
-  let!(:hook) { web_hooks.create! }
-
-  let!(:log_a) { logs.create!(web_hook_id: hook.id, response_body: 'msg-a') }
-  let!(:log_b) { logs.create!(web_hook_id: hook.id, response_body: 'msg-b') }
-
-  describe '#up' do
-    it 'allows us to delete web-hooks and leave web-hook logs intact' do
-      migrate!
-
-      expect { hook.delete }.not_to change(logs, :count)
-
-      expect(logs.pluck(:response_body)).to match_array %w[msg-a msg-b]
-    end
-  end
-
-  describe '#down' do
-    it 'ensures referential integrity of hook logs' do
-      migrate!
-      schema_migrate_down!
-
-      expect { hook.delete }.to change(logs, :count).by(-2)
-    end
-  end
-end
diff --git a/spec/migrations/20220513043344_reschedule_expire_o_auth_tokens_spec.rb b/spec/migrations/20220513043344_reschedule_expire_o_auth_tokens_spec.rb
deleted file mode 100644
index b03849b61a238115801ceb476952761a3bf3caff..0000000000000000000000000000000000000000
--- a/spec/migrations/20220513043344_reschedule_expire_o_auth_tokens_spec.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe RescheduleExpireOAuthTokens, feature_category: :system_access do
-  let!(:migration) { described_class::MIGRATION }
-
-  describe '#up' do
-    it 'schedules background jobs for each batch of oauth tokens' do
-      migrate!
-
-      expect(migration).to(
-        have_scheduled_batched_migration(
-          table_name: :oauth_access_tokens,
-          column_name: :id,
-          interval: described_class::INTERVAL
-        )
-      )
-    end
-  end
-
-  describe '#down' do
-    it 'deletes all batched migration records' do
-      migrate!
-      schema_migrate_down!
-
-      expect(migration).not_to have_scheduled_batched_migration
-    end
-  end
-end
diff --git a/spec/migrations/20220523171107_drop_deploy_tokens_token_column_spec.rb b/spec/migrations/20220523171107_drop_deploy_tokens_token_column_spec.rb
deleted file mode 100644
index 9cbc6dea6a9770fa16ca29784f1563200454c718..0000000000000000000000000000000000000000
--- a/spec/migrations/20220523171107_drop_deploy_tokens_token_column_spec.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe DropDeployTokensTokenColumn, feature_category: :continuous_delivery do
-  let(:deploy_tokens) { table(:deploy_tokens) }
-
-  it 'correctly migrates up and down' do
-    reversible_migration do |migration|
-      migration.before -> {
-        expect(deploy_tokens.column_names).to include('token')
-      }
-
-      migration.after -> {
-        deploy_tokens.reset_column_information
-
-        expect(deploy_tokens.column_names).not_to include('token')
-      }
-    end
-  end
-end
diff --git a/spec/migrations/20220524074947_finalize_backfill_null_note_discussion_ids_spec.rb b/spec/migrations/20220524074947_finalize_backfill_null_note_discussion_ids_spec.rb
deleted file mode 100644
index 9071c61ca0ebd0b8795c45598a8e92efe6d75e05..0000000000000000000000000000000000000000
--- a/spec/migrations/20220524074947_finalize_backfill_null_note_discussion_ids_spec.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe FinalizeBackfillNullNoteDiscussionIds, :migration, feature_category: :team_planning do
-  subject(:migration) { described_class.new }
-
-  let(:notes) { table(:notes) }
-  let(:bg_migration_class) { Gitlab::BackgroundMigration::BackfillNoteDiscussionId }
-  let(:bg_migration) { instance_double(bg_migration_class) }
-
-  before do
-    stub_const("#{described_class.name}::BATCH_SIZE", 2)
-  end
-
-  it 'performs remaining background migrations', :aggregate_failures do
-    # Already migrated
-    notes.create!(noteable_type: 'Issue', noteable_id: 1, discussion_id: Digest::SHA1.hexdigest('note1'))
-    notes.create!(noteable_type: 'Issue', noteable_id: 1, discussion_id: Digest::SHA1.hexdigest('note2'))
-    # update required
-    record1 = notes.create!(noteable_type: 'Issue', noteable_id: 1, discussion_id: nil)
-    record2 = notes.create!(noteable_type: 'Issue', noteable_id: 1, discussion_id: nil)
-    record3 = notes.create!(noteable_type: 'Issue', noteable_id: 1, discussion_id: nil)
-
-    expect(Gitlab::BackgroundMigration).to receive(:steal).with(bg_migration_class.name.demodulize)
-    expect(bg_migration_class).to receive(:new).twice.and_return(bg_migration)
-    expect(bg_migration).to receive(:perform).with(record1.id, record2.id)
-    expect(bg_migration).to receive(:perform).with(record3.id, record3.id)
-
-    migrate!
-  end
-end
diff --git a/spec/migrations/20220524184149_create_sync_project_namespace_details_trigger_spec.rb b/spec/migrations/20220524184149_create_sync_project_namespace_details_trigger_spec.rb
deleted file mode 100644
index 1b598266f507d61080e661413f79b7ac53397a6b..0000000000000000000000000000000000000000
--- a/spec/migrations/20220524184149_create_sync_project_namespace_details_trigger_spec.rb
+++ /dev/null
@@ -1,73 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe CreateSyncProjectNamespaceDetailsTrigger, feature_category: :groups_and_projects do
-  let(:migration) { described_class.new }
-  let(:projects) { table(:projects) }
-  let(:namespaces) { table(:namespaces) }
-  let(:namespace_details) { table(:namespace_details) }
-  let!(:timestamp) { Time.new(2020, 01, 01).utc }
-  let!(:project_namespace) { namespaces.create!(name: 'name', path: 'path') }
-  let!(:namespace) { namespaces.create!(name: 'group', path: 'group_path') }
-
-  let(:synced_attributes) do
-    {
-      description: 'description',
-      description_html: '<p>description</p>',
-      cached_markdown_version: 1966080,
-      updated_at: timestamp
-    }
-  end
-
-  let(:other_attributes) do
-    {
-      name: 'project_name',
-      project_namespace_id: project_namespace.id,
-      namespace_id: namespace.id
-    }
-  end
-
-  let(:attributes) { other_attributes.merge(synced_attributes) }
-
-  describe '#up' do
-    before do
-      migrate!
-    end
-
-    describe 'INSERT trigger' do
-      it 'the created namespace_details record has matching attributes' do
-        project = projects.create!(attributes)
-        synced_namespace_details = namespace_details.find_by(namespace_id: project.project_namespace_id)
-
-        expect(synced_namespace_details).to have_attributes(synced_attributes)
-      end
-    end
-
-    describe 'UPDATE trigger' do
-      let!(:project) { projects.create!(attributes) }
-
-      it 'updates the attribute in the synced namespace_details record' do
-        project.update!(description: 'new_description')
-
-        synced_namespace_details = namespace_details.find_by(namespace_id: project.project_namespace_id)
-        expect(synced_namespace_details.description).to eq('new_description')
-      end
-    end
-  end
-
-  describe '#down' do
-    before do
-      migration.up
-      migration.down
-    end
-
-    it 'drops the trigger' do
-      expect do
-        projects.create!(attributes)
-      end.not_to change(namespace_details, :count)
-    end
-  end
-end
diff --git a/spec/migrations/20220525221133_schedule_backfill_vulnerability_reads_cluster_agent_spec.rb b/spec/migrations/20220525221133_schedule_backfill_vulnerability_reads_cluster_agent_spec.rb
deleted file mode 100644
index 9e414157b3fbe04cf5d1bf3be4a1d1166c70761a..0000000000000000000000000000000000000000
--- a/spec/migrations/20220525221133_schedule_backfill_vulnerability_reads_cluster_agent_spec.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe ScheduleBackfillVulnerabilityReadsClusterAgent, feature_category: :vulnerability_management do
-  let!(:batched_migration) { described_class::MIGRATION_NAME }
-
-  it 'schedules background jobs for each batch of vulnerability reads' do
-    reversible_migration do |migration|
-      migration.before -> {
-        expect(batched_migration).not_to have_scheduled_batched_migration
-      }
-
-      migration.after -> {
-        expect(batched_migration).to have_scheduled_batched_migration(
-          table_name: :vulnerability_reads,
-          column_name: :id,
-          interval: described_class::DELAY_INTERVAL
-        )
-      }
-    end
-  end
-end
diff --git a/spec/migrations/20220601110011_schedule_remove_self_managed_wiki_notes_spec.rb b/spec/migrations/20220601110011_schedule_remove_self_managed_wiki_notes_spec.rb
deleted file mode 100644
index 63174d054d718793895b8c4a3022f752a963b2e9..0000000000000000000000000000000000000000
--- a/spec/migrations/20220601110011_schedule_remove_self_managed_wiki_notes_spec.rb
+++ /dev/null
@@ -1,43 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe ScheduleRemoveSelfManagedWikiNotes, feature_category: :wiki do
-  let!(:batched_migration) { described_class::MIGRATION }
-
-  it 'schedules new batched migration' do
-    reversible_migration do |migration|
-      migration.before -> {
-        expect(batched_migration).not_to have_scheduled_batched_migration
-      }
-
-      migration.after -> {
-        expect(batched_migration).to have_scheduled_batched_migration(
-          table_name: :notes,
-          column_name: :id,
-          interval: described_class::INTERVAL
-        )
-      }
-    end
-  end
-
-  context 'with com? or staging?' do
-    before do
-      allow(::Gitlab).to receive(:com?).and_return(true)
-      allow(::Gitlab).to receive(:staging?).and_return(false)
-    end
-
-    it 'does not schedule new batched migration' do
-      reversible_migration do |migration|
-        migration.before -> {
-          expect(batched_migration).not_to have_scheduled_batched_migration
-        }
-
-        migration.after -> {
-          expect(batched_migration).not_to have_scheduled_batched_migration
-        }
-      end
-    end
-  end
-end
diff --git a/spec/migrations/20220601152916_add_user_id_and_ip_address_success_index_to_authentication_events_spec.rb b/spec/migrations/20220601152916_add_user_id_and_ip_address_success_index_to_authentication_events_spec.rb
deleted file mode 100644
index c01d982c34e1a2973609bbff12a9a0f61f5e4b4c..0000000000000000000000000000000000000000
--- a/spec/migrations/20220601152916_add_user_id_and_ip_address_success_index_to_authentication_events_spec.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe AddUserIdAndIpAddressSuccessIndexToAuthenticationEvents,
-  feature_category: :system_access do
-  let(:db) { described_class.new }
-  let(:old_index) { described_class::OLD_INDEX_NAME }
-  let(:new_index) { described_class::NEW_INDEX_NAME }
-
-  it 'correctly migrates up and down' do
-    reversible_migration do |migration|
-      migration.before -> {
-        expect(db.connection.indexes(:authentication_events).map(&:name)).to include(old_index)
-        expect(db.connection.indexes(:authentication_events).map(&:name)).not_to include(new_index)
-      }
-
-      migration.after -> {
-        expect(db.connection.indexes(:authentication_events).map(&:name)).to include(new_index)
-        expect(db.connection.indexes(:authentication_events).map(&:name)).not_to include(old_index)
-      }
-    end
-  end
-end
diff --git a/spec/migrations/20220606080509_fix_incorrect_job_artifacts_expire_at_spec.rb b/spec/migrations/20220606080509_fix_incorrect_job_artifacts_expire_at_spec.rb
deleted file mode 100644
index 314385e35dae6c25e361ecf12aa2d3d6787a86ca..0000000000000000000000000000000000000000
--- a/spec/migrations/20220606080509_fix_incorrect_job_artifacts_expire_at_spec.rb
+++ /dev/null
@@ -1,42 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe FixIncorrectJobArtifactsExpireAt, migration: :gitlab_ci, feature_category: :build_artifacts do
-  let!(:batched_migration) { described_class::MIGRATION }
-
-  it 'does not schedule background jobs when Gitlab.com is true' do
-    allow(Gitlab).to receive(:com?).and_return(true)
-
-    reversible_migration do |migration|
-      migration.before -> {
-        expect(batched_migration).not_to have_scheduled_batched_migration
-      }
-
-      migration.after -> {
-        expect(batched_migration).not_to have_scheduled_batched_migration
-      }
-    end
-  end
-
-  it 'schedules background job on non Gitlab.com' do
-    allow(Gitlab).to receive(:com?).and_return(false)
-
-    reversible_migration do |migration|
-      migration.before -> {
-        expect(batched_migration).not_to have_scheduled_batched_migration
-      }
-
-      migration.after -> {
-        expect(batched_migration).to have_scheduled_batched_migration(
-          gitlab_schema: :gitlab_ci,
-          table_name: :ci_job_artifacts,
-          column_name: :id,
-          interval: described_class::INTERVAL,
-          batch_size: described_class::BATCH_SIZE
-        )
-      }
-    end
-  end
-end
diff --git a/spec/migrations/20220606082910_add_tmp_index_for_potentially_misassociated_vulnerability_occurrences_spec.rb b/spec/migrations/20220606082910_add_tmp_index_for_potentially_misassociated_vulnerability_occurrences_spec.rb
deleted file mode 100644
index 4ae4093354169446b50dc8a99eccd75e50c07b88..0000000000000000000000000000000000000000
--- a/spec/migrations/20220606082910_add_tmp_index_for_potentially_misassociated_vulnerability_occurrences_spec.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-require "spec_helper"
-
-require_migration!
-
-RSpec.describe AddTmpIndexForPotentiallyMisassociatedVulnerabilityOccurrences,
-  feature_category: :vulnerability_management do
-  let(:async_index) { Gitlab::Database::AsyncIndexes::PostgresAsyncIndex }
-  let(:index_name) { described_class::INDEX_NAME }
-
-  it "schedules the index" do
-    reversible_migration do |migration|
-      migration.before -> do
-        expect(async_index.where(name: index_name).count).to be(0)
-      end
-
-      migration.after -> do
-        expect(async_index.where(name: index_name).count).to be(1)
-      end
-    end
-  end
-end
diff --git a/spec/migrations/20220607082910_add_sync_tmp_index_for_potentially_misassociated_vulnerability_occurrences_spec.rb b/spec/migrations/20220607082910_add_sync_tmp_index_for_potentially_misassociated_vulnerability_occurrences_spec.rb
deleted file mode 100644
index d4a800eb1dbb74bc1b67cbbf65c5174343dfa383..0000000000000000000000000000000000000000
--- a/spec/migrations/20220607082910_add_sync_tmp_index_for_potentially_misassociated_vulnerability_occurrences_spec.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-require "spec_helper"
-
-require_migration!
-
-RSpec.describe AddSyncTmpIndexForPotentiallyMisassociatedVulnerabilityOccurrences,
-  feature_category: :vulnerability_management do
-  let(:table) { "vulnerability_occurrences" }
-  let(:index) { described_class::INDEX_NAME }
-
-  it "creates and drops the index" do
-    reversible_migration do |migration|
-      migration.before -> do
-        expect(ActiveRecord::Base.connection.indexes(table).map(&:name)).not_to include(index)
-      end
-
-      migration.after -> do
-        expect(ActiveRecord::Base.connection.indexes(table).map(&:name)).to include(index)
-      end
-    end
-  end
-end
diff --git a/spec/migrations/20220620132300_update_last_run_date_for_iterations_cadences_spec.rb b/spec/migrations/20220620132300_update_last_run_date_for_iterations_cadences_spec.rb
deleted file mode 100644
index 5ac4bba4cb5866b76fc62cfa620bce0304359ccd..0000000000000000000000000000000000000000
--- a/spec/migrations/20220620132300_update_last_run_date_for_iterations_cadences_spec.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe UpdateLastRunDateForIterationsCadences, :migration, feature_category: :team_planning do
-  let(:current_date) { Date.parse(ApplicationRecord.connection.execute("SELECT CURRENT_DATE").first["current_date"]) }
-  let(:namespaces) { table(:namespaces) }
-  let(:iterations_cadences) { table(:iterations_cadences) }
-
-  let!(:group) { namespaces.create!(name: 'foo', path: 'foo') }
-  let!(:cadence_1) do
-    iterations_cadences.create!(group_id: group.id, title: "cadence 1", last_run_date: Date.today - 5.days)
-  end
-
-  let!(:cadence_2) { iterations_cadences.create!(group_id: group.id, title: "cadence 2", last_run_date: nil) }
-  let!(:cadence_3) do
-    iterations_cadences.create!(group_id: group.id, title: "cadence 2", last_run_date: nil, automatic: false)
-  end
-
-  it 'sets last_run_date to CURRENT_DATE for iterations cadences with automatic=true', :aggregate_failures do
-    migrate!
-
-    expect(cadence_1.reload.last_run_date).to eq(current_date)
-    expect(cadence_2.reload.last_run_date).to eq(current_date)
-    expect(cadence_3.reload.last_run_date).to eq(nil)
-  end
-end
diff --git a/spec/migrations/20220622080547_backfill_project_statistics_with_container_registry_size_spec.rb b/spec/migrations/20220622080547_backfill_project_statistics_with_container_registry_size_spec.rb
deleted file mode 100644
index 3ca8c1709f38d2759a5db89f2301ab9974e81cc6..0000000000000000000000000000000000000000
--- a/spec/migrations/20220622080547_backfill_project_statistics_with_container_registry_size_spec.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe BackfillProjectStatisticsWithContainerRegistrySize, feature_category: :container_registry do
-  let!(:batched_migration) { described_class::MIGRATION_CLASS }
-
-  it 'does not schedule background jobs when Gitlab.com is false' do
-    allow(Gitlab).to receive(:com?).and_return(false)
-    allow(Gitlab).to receive(:dev_or_test_env?).and_return(false)
-
-    reversible_migration do |migration|
-      migration.before -> {
-        expect(batched_migration).not_to have_scheduled_batched_migration
-      }
-
-      migration.after -> {
-        expect(batched_migration).not_to have_scheduled_batched_migration
-      }
-    end
-  end
-
-  it 'schedules background jobs for each batch of container_repository' do
-    allow(Gitlab).to receive(:com?).and_return(true)
-
-    reversible_migration do |migration|
-      migration.before -> {
-        expect(batched_migration).not_to have_scheduled_batched_migration
-      }
-
-      migration.after -> {
-        expect(batched_migration).to have_scheduled_batched_migration(
-          table_name: :container_repositories,
-          column_name: :project_id,
-          interval: described_class::DELAY_INTERVAL
-        )
-      }
-    end
-  end
-end
diff --git a/spec/migrations/20220627090231_schedule_disable_legacy_open_source_license_for_inactive_public_projects_spec.rb b/spec/migrations/20220627090231_schedule_disable_legacy_open_source_license_for_inactive_public_projects_spec.rb
deleted file mode 100644
index 4927e61da959c422ae66180acf62832d443e54dd..0000000000000000000000000000000000000000
--- a/spec/migrations/20220627090231_schedule_disable_legacy_open_source_license_for_inactive_public_projects_spec.rb
+++ /dev/null
@@ -1,63 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe ScheduleDisableLegacyOpenSourceLicenseForInactivePublicProjects, feature_category: :groups_and_projects do
-  context 'on gitlab.com' do
-    let(:migration) { described_class::MIGRATION }
-
-    before do
-      allow(Gitlab).to receive(:com?).and_return(true)
-    end
-
-    describe '#up' do
-      it 'schedules background jobs for each batch of projects' do
-        migrate!
-
-        expect(migration).to(
-          have_scheduled_batched_migration(
-            table_name: :projects,
-            column_name: :id,
-            interval: described_class::INTERVAL,
-            batch_size: described_class::BATCH_SIZE,
-            sub_batch_size: described_class::SUB_BATCH_SIZE
-          )
-        )
-      end
-    end
-
-    describe '#down' do
-      it 'deletes all batched migration records' do
-        migrate!
-        schema_migrate_down!
-
-        expect(migration).not_to have_scheduled_batched_migration
-      end
-    end
-  end
-
-  context 'on self-managed instances' do
-    let(:migration) { described_class.new }
-
-    before do
-      allow(Gitlab).to receive(:com?).and_return(false)
-    end
-
-    describe '#up' do
-      it 'does not schedule background job' do
-        expect(migration).not_to receive(:queue_batched_background_migration)
-
-        migration.up
-      end
-    end
-
-    describe '#down' do
-      it 'does not delete background job' do
-        expect(migration).not_to receive(:delete_batched_background_migration)
-
-        migration.down
-      end
-    end
-  end
-end
diff --git a/spec/migrations/20220627152642_queue_update_delayed_project_removal_to_null_for_user_namespace_spec.rb b/spec/migrations/20220627152642_queue_update_delayed_project_removal_to_null_for_user_namespace_spec.rb
deleted file mode 100644
index 0335ba45993f19bd4adb54f91ce263b63a6f7edc..0000000000000000000000000000000000000000
--- a/spec/migrations/20220627152642_queue_update_delayed_project_removal_to_null_for_user_namespace_spec.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe QueueUpdateDelayedProjectRemovalToNullForUserNamespace, feature_category: :groups_and_projects do
-  let(:migration) { described_class::MIGRATION }
-
-  describe '#up' do
-    it 'schedules background jobs for each batch of namespace settings' do
-      migrate!
-
-      expect(migration).to(
-        have_scheduled_batched_migration(
-          table_name: :namespace_settings,
-          column_name: :namespace_id,
-          interval: described_class::INTERVAL,
-          batch_size: described_class::BATCH_SIZE
-        )
-      )
-    end
-  end
-
-  describe '#down' do
-    it 'deletes all batched migration records' do
-      migrate!
-      schema_migrate_down!
-
-      expect(migration).not_to have_scheduled_batched_migration
-    end
-  end
-end
diff --git a/spec/migrations/20220628012902_finalise_project_namespace_members_spec.rb b/spec/migrations/20220628012902_finalise_project_namespace_members_spec.rb
deleted file mode 100644
index e3ba45ff13b1f2dc36108ec3d6e7141f5e56fc78..0000000000000000000000000000000000000000
--- a/spec/migrations/20220628012902_finalise_project_namespace_members_spec.rb
+++ /dev/null
@@ -1,76 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe FinaliseProjectNamespaceMembers, :migration, feature_category: :groups_and_projects do
-  let(:batched_migrations) { table(:batched_background_migrations) }
-
-  let!(:migration) { described_class::MIGRATION }
-
-  describe '#up' do
-    shared_examples 'finalizes the migration' do
-      it 'finalizes the migration' do
-        allow_next_instance_of(Gitlab::Database::BackgroundMigration::BatchedMigrationRunner) do |runner|
-          expect(runner).to receive(:finalize).with(migration, :members, :id, [])
-        end
-      end
-    end
-
-    context 'when migration is missing' do
-      before do
-        batched_migrations.where(job_class_name: migration).delete_all
-      end
-
-      it 'warns migration not found' do
-        expect(Gitlab::AppLogger)
-          .to receive(:warn).with(/Could not find batched background migration for the given configuration:/)
-
-        migrate!
-      end
-    end
-
-    context 'with migration present' do
-      let!(:project_member_namespace_id_backfill) do
-        batched_migrations.create!(
-          job_class_name: migration,
-          table_name: :members,
-          column_name: :id,
-          job_arguments: [],
-          interval: 2.minutes,
-          min_value: 1,
-          max_value: 2,
-          batch_size: 1000,
-          sub_batch_size: 200,
-          gitlab_schema: :gitlab_main,
-          status: 3 # finished
-        )
-      end
-
-      context 'when migration finished successfully' do
-        it 'does not raise exception' do
-          expect { migrate! }.not_to raise_error
-        end
-      end
-
-      context 'with different migration statuses' do
-        using RSpec::Parameterized::TableSyntax
-
-        where(:status, :description) do
-          0 | 'paused'
-          1 | 'active'
-          4 | 'failed'
-          5 | 'finalizing'
-        end
-
-        with_them do
-          before do
-            project_member_namespace_id_backfill.update!(status: status)
-          end
-
-          it_behaves_like 'finalizes the migration'
-        end
-      end
-    end
-  end
-end
diff --git a/spec/migrations/20220629184402_unset_escalation_policies_for_alert_incidents_spec.rb b/spec/migrations/20220629184402_unset_escalation_policies_for_alert_incidents_spec.rb
deleted file mode 100644
index e01cca038ea65020dc9486b5b805656fc5f88289..0000000000000000000000000000000000000000
--- a/spec/migrations/20220629184402_unset_escalation_policies_for_alert_incidents_spec.rb
+++ /dev/null
@@ -1,72 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe UnsetEscalationPoliciesForAlertIncidents, feature_category: :incident_management do
-  let(:namespaces)          { table(:namespaces) }
-  let(:projects)            { table(:projects) }
-  let(:issues)              { table(:issues) }
-  let(:alerts)              { table(:alert_management_alerts) }
-  let(:escalation_policies) { table(:incident_management_escalation_policies) }
-  let(:escalation_statuses) { table(:incident_management_issuable_escalation_statuses) }
-  let(:current_time)        { Time.current.change(usec: 0) }
-
-  let!(:namespace)         { namespaces.create!(name: 'namespace', path: 'namespace') }
-  let!(:project_namespace) { namespaces.create!(name: 'project', path: 'project', type: 'project') }
-  let!(:project)           { projects.create!(namespace_id: namespace.id, project_namespace_id: project_namespace.id) }
-  let!(:policy)            { escalation_policies.create!(project_id: project.id, name: 'escalation policy') }
-
-  # Escalation status with policy from alert; Policy & escalation start time should be nullified
-  let!(:issue_1)             { create_issue }
-  let!(:escalation_status_1) { create_status(issue_1, policy, current_time) }
-  let!(:alert_1)             { create_alert(1, issue_1) }
-
-  # Escalation status without policy, but with alert; Should be ignored
-  let!(:issue_2)             { create_issue }
-  let!(:escalation_status_2) { create_status(issue_2, nil, current_time) }
-  let!(:alert_2)             { create_alert(2, issue_2) }
-
-  # Escalation status without alert, but with policy; Should be ignored
-  let!(:issue_3)             { create_issue }
-  let!(:escalation_status_3) { create_status(issue_3, policy, current_time) }
-
-  # Alert without issue; Should be ignored
-  let!(:alert_3) { create_alert(3) }
-
-  it 'removes the escalation policy if the incident corresponds to an alert' do
-    expect { migrate! }
-      .to change { escalation_status_1.reload.policy_id }.from(policy.id).to(nil)
-      .and change { escalation_status_1.escalations_started_at }.from(current_time).to(nil)
-      .and not_change { policy_attrs(escalation_status_2) }
-      .and not_change { policy_attrs(escalation_status_3) }
-  end
-
-  private
-
-  def create_issue
-    issues.create!(project_id: project.id, namespace_id: project.project_namespace_id)
-  end
-
-  def create_status(issue, policy = nil, escalations_started_at = nil)
-    escalation_statuses.create!(
-      issue_id: issue.id,
-      policy_id: policy&.id,
-      escalations_started_at: escalations_started_at
-    )
-  end
-
-  def create_alert(iid, issue = nil)
-    alerts.create!(
-      project_id: project.id,
-      started_at: current_time,
-      title: "alert #{iid}",
-      iid: iid.to_s,
-      issue_id: issue&.id
-    )
-  end
-
-  def policy_attrs(escalation_status)
-    escalation_status.reload.slice(:policy_id, :escalations_started_at)
-  end
-end
diff --git a/spec/migrations/20220715163254_update_notes_in_past_spec.rb b/spec/migrations/20220715163254_update_notes_in_past_spec.rb
deleted file mode 100644
index 6250229a1f9caac7eb75254dafa555c5e956fe84..0000000000000000000000000000000000000000
--- a/spec/migrations/20220715163254_update_notes_in_past_spec.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe UpdateNotesInPast, :migration, feature_category: :team_planning do
-  let(:notes) { table(:notes) }
-
-  it 'updates created_at when it is too much in the past' do
-    notes.create!(id: 10, note: 'note', created_at: '2009-06-01')
-    notes.create!(id: 11, note: 'note', created_at: '1970-01-01')
-    notes.create!(id: 12, note: 'note', created_at: '1600-06-01')
-
-    migrate!
-
-    expect(notes.all).to contain_exactly(
-      an_object_having_attributes(id: 10, created_at: DateTime.parse('2009-06-01')),
-      an_object_having_attributes(id: 11, created_at: DateTime.parse('1970-01-01')),
-      an_object_having_attributes(id: 12, created_at: DateTime.parse('1970-01-01'))
-    )
-  end
-end
diff --git a/spec/migrations/20220721031446_schedule_disable_legacy_open_source_license_for_one_member_no_repo_projects_spec.rb b/spec/migrations/20220721031446_schedule_disable_legacy_open_source_license_for_one_member_no_repo_projects_spec.rb
deleted file mode 100644
index 0701f05057a87d51b534fd2a75bbb63d2647e5ee..0000000000000000000000000000000000000000
--- a/spec/migrations/20220721031446_schedule_disable_legacy_open_source_license_for_one_member_no_repo_projects_spec.rb
+++ /dev/null
@@ -1,64 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe ScheduleDisableLegacyOpenSourceLicenseForOneMemberNoRepoProjects, feature_category: :groups_and_projects do
-  context 'when on gitlab.com' do
-    let(:migration) { described_class::MIGRATION }
-
-    before do
-      allow(Gitlab).to receive(:com?).and_return(true)
-    end
-
-    describe '#up' do
-      it 'schedules background jobs for each batch of projects' do
-        migrate!
-
-        expect(migration).to(
-          have_scheduled_batched_migration(
-            table_name: :projects,
-            column_name: :id,
-            interval: described_class::INTERVAL,
-            batch_size: described_class::BATCH_SIZE,
-            max_batch_size: described_class::MAX_BATCH_SIZE,
-            sub_batch_size: described_class::SUB_BATCH_SIZE
-          )
-        )
-      end
-    end
-
-    describe '#down' do
-      it 'deletes all batched migration records' do
-        migrate!
-        schema_migrate_down!
-
-        expect(migration).not_to have_scheduled_batched_migration
-      end
-    end
-  end
-
-  context 'when on self-managed instance' do
-    let(:migration) { described_class.new }
-
-    before do
-      allow(Gitlab).to receive(:com?).and_return(false)
-    end
-
-    describe '#up' do
-      it 'does not schedule background job' do
-        expect(migration).not_to receive(:queue_batched_background_migration)
-
-        migration.up
-      end
-    end
-
-    describe '#down' do
-      it 'does not delete background job' do
-        expect(migration).not_to receive(:delete_batched_background_migration)
-
-        migration.down
-      end
-    end
-  end
-end
diff --git a/spec/migrations/20220722084543_schedule_disable_legacy_open_source_license_for_no_issues_no_repo_projects_spec.rb b/spec/migrations/20220722084543_schedule_disable_legacy_open_source_license_for_no_issues_no_repo_projects_spec.rb
deleted file mode 100644
index 83c658f700e1173a5185f7efcc56f1cdf8e88059..0000000000000000000000000000000000000000
--- a/spec/migrations/20220722084543_schedule_disable_legacy_open_source_license_for_no_issues_no_repo_projects_spec.rb
+++ /dev/null
@@ -1,64 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe ScheduleDisableLegacyOpenSourceLicenseForNoIssuesNoRepoProjects, feature_category: :groups_and_projects do
-  context 'when on gitlab.com' do
-    let(:migration) { described_class::MIGRATION }
-
-    before do
-      allow(Gitlab).to receive(:com?).and_return(true)
-    end
-
-    describe '#up' do
-      it 'schedules background jobs for each batch of projects' do
-        migrate!
-
-        expect(migration).to(
-          have_scheduled_batched_migration(
-            table_name: :projects,
-            column_name: :id,
-            interval: described_class::INTERVAL,
-            batch_size: described_class::BATCH_SIZE,
-            max_batch_size: described_class::MAX_BATCH_SIZE,
-            sub_batch_size: described_class::SUB_BATCH_SIZE
-          )
-        )
-      end
-    end
-
-    describe '#down' do
-      it 'deletes all batched migration records' do
-        migrate!
-        schema_migrate_down!
-
-        expect(migration).not_to have_scheduled_batched_migration
-      end
-    end
-  end
-
-  context 'when on self-managed instance' do
-    let(:migration) { described_class.new }
-
-    before do
-      allow(Gitlab).to receive(:com?).and_return(false)
-    end
-
-    describe '#up' do
-      it 'does not schedule background job' do
-        expect(migration).not_to receive(:queue_batched_background_migration)
-
-        migration.up
-      end
-    end
-
-    describe '#down' do
-      it 'does not delete background job' do
-        expect(migration).not_to receive(:delete_batched_background_migration)
-
-        migration.down
-      end
-    end
-  end
-end
diff --git a/spec/migrations/20220722110026_reschedule_set_legacy_open_source_license_available_for_non_public_projects_spec.rb b/spec/migrations/20220722110026_reschedule_set_legacy_open_source_license_available_for_non_public_projects_spec.rb
deleted file mode 100644
index 74638918e02f3b8af3eb84695df246c3f305474d..0000000000000000000000000000000000000000
--- a/spec/migrations/20220722110026_reschedule_set_legacy_open_source_license_available_for_non_public_projects_spec.rb
+++ /dev/null
@@ -1,64 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe RescheduleSetLegacyOpenSourceLicenseAvailableForNonPublicProjects, feature_category: :groups_and_projects do
-  context 'when on gitlab.com' do
-    let(:migration) { described_class::MIGRATION }
-
-    before do
-      allow(Gitlab).to receive(:com?).and_return(true)
-    end
-
-    describe '#up' do
-      it 'schedules background jobs for each batch of projects' do
-        migrate!
-
-        expect(migration).to(
-          have_scheduled_batched_migration(
-            table_name: :projects,
-            column_name: :id,
-            interval: described_class::INTERVAL,
-            batch_size: described_class::BATCH_SIZE,
-            max_batch_size: described_class::MAX_BATCH_SIZE,
-            sub_batch_size: described_class::SUB_BATCH_SIZE
-          )
-        )
-      end
-    end
-
-    describe '#down' do
-      it 'deletes all batched migration records' do
-        migrate!
-        schema_migrate_down!
-
-        expect(migration).not_to have_scheduled_batched_migration
-      end
-    end
-  end
-
-  context 'when on self-managed instance' do
-    let(:migration) { described_class.new }
-
-    before do
-      allow(Gitlab).to receive(:com?).and_return(false)
-    end
-
-    describe '#up' do
-      it 'does not schedule background job' do
-        expect(migration).not_to receive(:queue_batched_background_migration)
-
-        migration.up
-      end
-    end
-
-    describe '#down' do
-      it 'does not delete background job' do
-        expect(migration).not_to receive(:delete_batched_background_migration)
-
-        migration.down
-      end
-    end
-  end
-end
diff --git a/spec/migrations/20220725150127_update_jira_tracker_data_deployment_type_based_on_url_spec.rb b/spec/migrations/20220725150127_update_jira_tracker_data_deployment_type_based_on_url_spec.rb
deleted file mode 100644
index 1bd186a77e7b0be32a59fde5605af795f5158005..0000000000000000000000000000000000000000
--- a/spec/migrations/20220725150127_update_jira_tracker_data_deployment_type_based_on_url_spec.rb
+++ /dev/null
@@ -1,58 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe UpdateJiraTrackerDataDeploymentTypeBasedOnUrl, :migration, feature_category: :integrations do
-  let(:integrations_table) { table(:integrations) }
-  let(:service_jira_cloud) { integrations_table.create!(id: 1, type_new: 'JiraService') }
-  let(:service_jira_server) { integrations_table.create!(id: 2, type_new: 'JiraService') }
-
-  before do
-    jira_tracker_data = Class.new(ApplicationRecord) do
-      self.table_name = 'jira_tracker_data'
-
-      def self.encryption_options
-        {
-          key: Settings.attr_encrypted_db_key_base_32,
-          encode: true,
-          mode: :per_attribute_iv,
-          algorithm: 'aes-256-gcm'
-        }
-      end
-
-      attr_encrypted :url, encryption_options
-      attr_encrypted :api_url, encryption_options
-      attr_encrypted :username, encryption_options
-      attr_encrypted :password, encryption_options
-    end
-
-    stub_const('JiraTrackerData', jira_tracker_data)
-    stub_const("#{described_class}::BATCH_SIZE", 1)
-    stub_const("#{described_class}::SUB_BATCH_SIZE", 1)
-  end
-
-  # rubocop:disable Layout/LineLength
-  # rubocop:disable RSpec/ScatteredLet
-  let!(:tracker_data_cloud) { JiraTrackerData.create!(id: 1, integration_id: service_jira_cloud.id, url: "https://test-domain.atlassian.net", deployment_type: 0) }
-  let!(:tracker_data_server) { JiraTrackerData.create!(id: 2, integration_id: service_jira_server.id, url: "http://totally-not-jira-server.company.org", deployment_type: 0) }
-  # rubocop:enable Layout/LineLength
-  # rubocop:enable RSpec/ScatteredLet
-
-  around do |example|
-    freeze_time { Sidekiq::Testing.fake! { example.run } }
-  end
-
-  let(:migration) { described_class::MIGRATION } # rubocop:disable RSpec/ScatteredLet
-
-  it 'schedules background migration' do
-    migrate!
-
-    expect(migration).to have_scheduled_batched_migration(
-      table_name: :jira_tracker_data,
-      column_name: :id,
-      interval: described_class::DELAY_INTERVAL,
-      gitlab_schema: :gitlab_main
-    )
-  end
-end
diff --git a/spec/migrations/20220801155858_schedule_disable_legacy_open_source_licence_for_recent_public_projects_spec.rb b/spec/migrations/20220801155858_schedule_disable_legacy_open_source_licence_for_recent_public_projects_spec.rb
deleted file mode 100644
index f383b4aafea76162482dcf3b6779e810e8f1ee3d..0000000000000000000000000000000000000000
--- a/spec/migrations/20220801155858_schedule_disable_legacy_open_source_licence_for_recent_public_projects_spec.rb
+++ /dev/null
@@ -1,63 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe ScheduleDisableLegacyOpenSourceLicenceForRecentPublicProjects,
-  schema: 20220801155858, feature_category: :groups_and_projects do
-  context 'when on gitlab.com' do
-    let(:background_migration) { described_class::MIGRATION }
-    let(:migration) { described_class.new }
-
-    before do
-      allow(Gitlab).to receive(:com?).and_return(true)
-      migration.up
-    end
-
-    describe '#up' do
-      it 'schedules background jobs for each batch of projects' do
-        expect(background_migration).to(
-          have_scheduled_batched_migration(
-            table_name: :projects,
-            column_name: :id,
-            interval: described_class::INTERVAL,
-            batch_size: described_class::BATCH_SIZE,
-            sub_batch_size: described_class::SUB_BATCH_SIZE
-          )
-        )
-      end
-    end
-
-    describe '#down' do
-      it 'deletes all batched migration records' do
-        migration.down
-
-        expect(described_class::MIGRATION).not_to have_scheduled_batched_migration
-      end
-    end
-  end
-
-  context 'when on self-managed instances' do
-    let(:migration) { described_class.new }
-
-    before do
-      allow(Gitlab).to receive(:com?).and_return(false)
-    end
-
-    describe '#up' do
-      it 'does not schedule background job' do
-        expect(migration).not_to receive(:queue_batched_background_migration)
-
-        migration.up
-      end
-    end
-
-    describe '#down' do
-      it 'does not delete background job' do
-        expect(migration).not_to receive(:delete_batched_background_migration)
-
-        migration.down
-      end
-    end
-  end
-end
diff --git a/spec/migrations/20220802114351_reschedule_backfill_container_registry_size_into_project_statistics_spec.rb b/spec/migrations/20220802114351_reschedule_backfill_container_registry_size_into_project_statistics_spec.rb
deleted file mode 100644
index 35d0cdfa25ea6bad678ac6f9ae91fc90a04ed753..0000000000000000000000000000000000000000
--- a/spec/migrations/20220802114351_reschedule_backfill_container_registry_size_into_project_statistics_spec.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe RescheduleBackfillContainerRegistrySizeIntoProjectStatistics, feature_category: :container_registry do
-  let!(:batched_migration) { described_class::MIGRATION_CLASS }
-
-  it 'does not schedule background jobs when Gitlab.com is false' do
-    allow(Gitlab).to receive(:com?).and_return(false)
-    allow(Gitlab).to receive(:dev_or_test_env?).and_return(false)
-
-    reversible_migration do |migration|
-      migration.before -> {
-        expect(batched_migration).not_to have_scheduled_batched_migration
-      }
-
-      migration.after -> {
-        expect(batched_migration).not_to have_scheduled_batched_migration
-      }
-    end
-  end
-
-  it 'schedules background jobs for each batch of container_repository' do
-    allow(Gitlab).to receive(:com?).and_return(true)
-
-    reversible_migration do |migration|
-      migration.before -> {
-        expect(batched_migration).not_to have_scheduled_batched_migration
-      }
-
-      migration.after -> {
-        expect(batched_migration).to have_scheduled_batched_migration(
-          table_name: :container_repositories,
-          column_name: :project_id,
-          interval: described_class::DELAY_INTERVAL
-        )
-      }
-    end
-  end
-end
diff --git a/spec/migrations/20220802204737_remove_deactivated_user_highest_role_stats_spec.rb b/spec/migrations/20220802204737_remove_deactivated_user_highest_role_stats_spec.rb
deleted file mode 100644
index b731a8c8c189f3c815f4c753a264642d3af106b0..0000000000000000000000000000000000000000
--- a/spec/migrations/20220802204737_remove_deactivated_user_highest_role_stats_spec.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe RemoveDeactivatedUserHighestRoleStats, feature_category: :seat_cost_management do
-  let!(:users) { table(:users) }
-  let!(:user_highest_roles) { table(:user_highest_roles) }
-
-  let!(:user1) do
-    users.create!(username: 'user1', email: 'user1@example.com', projects_limit: 10, state: 'active')
-  end
-
-  let!(:user2) do
-    users.create!(username: 'user2', email: 'user2@example.com', projects_limit: 10, state: 'deactivated')
-  end
-
-  let!(:highest_role1) { user_highest_roles.create!(user_id: user1.id) }
-  let!(:highest_role2) { user_highest_roles.create!(user_id: user2.id) }
-
-  describe '#up' do
-    context 'when on gitlab.com' do
-      it 'does not change user highest role records' do
-        allow(Gitlab).to receive(:com?).and_return(true)
-        expect { migrate! }.not_to change(user_highest_roles, :count)
-      end
-    end
-
-    context 'when not on gitlab.com' do
-      it 'removes all user highest role records for deactivated users' do
-        allow(Gitlab).to receive(:com?).and_return(false)
-        migrate!
-        expect(user_highest_roles.pluck(:user_id)).to contain_exactly(
-          user1.id
-        )
-      end
-    end
-  end
-end
diff --git a/spec/migrations/20220816163444_update_start_date_for_iterations_cadences_spec.rb b/spec/migrations/20220816163444_update_start_date_for_iterations_cadences_spec.rb
deleted file mode 100644
index 0807f5d4e382a1538c4cb80ab27c62790ef01e92..0000000000000000000000000000000000000000
--- a/spec/migrations/20220816163444_update_start_date_for_iterations_cadences_spec.rb
+++ /dev/null
@@ -1,73 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe UpdateStartDateForIterationsCadences, :freeze_time, feature_category: :team_planning do
-  let(:migration) { described_class.new }
-  let(:namespaces) { table(:namespaces) }
-  let(:sprints) { table(:sprints) }
-  let(:iterations_cadences) { table(:iterations_cadences) }
-
-  let!(:group1) { namespaces.create!(name: 'abc', path: 'abc') }
-  let!(:group2) { namespaces.create!(name: 'def', path: 'def') }
-
-  let(:first_upcoming_start_date) { Date.current + 2.weeks }
-  let(:original_cadence_start_date) { Date.current - 1.week }
-
-  # rubocop: disable Layout/LineLength
-  let!(:auto_cadence1) { iterations_cadences.create!(start_date: original_cadence_start_date, group_id: group1.id, title: "ic") }
-  let!(:auto_cadence2) { iterations_cadences.create!(start_date: original_cadence_start_date, group_id: group1.id, title: "ic") }
-  let!(:auto_cadence3) { iterations_cadences.create!(start_date: nil, group_id: group2.id, title: "ic") }
-  let!(:manual_cadence1) { iterations_cadences.create!(start_date: Date.current, group_id: group1.id, automatic: false, title: "ic") }
-  let!(:manual_cadence2) { iterations_cadences.create!(start_date: Date.current, group_id: group2.id, automatic: false, title: "ic") }
-  # rubocop: enable Layout/LineLength
-
-  def cadence_params(cadence)
-    { iterations_cadence_id: cadence.id, group_id: cadence.group_id }
-  end
-
-  before do
-    # Past iteratioin
-    sprints.create!(id: 1, iid: 1, **cadence_params(auto_cadence1),
-      start_date: Date.current - 1.week, due_date: Date.current - 1.day)
-    # Current iteraition
-    sprints.create!(id: 3, iid: 5, **cadence_params(auto_cadence1),
-      start_date: Date.current, due_date: Date.current + 1.week)
-    # First upcoming iteration
-    sprints.create!(id: 4, iid: 8, **cadence_params(auto_cadence1),
-      start_date: first_upcoming_start_date, due_date: first_upcoming_start_date + 1.week)
-    # Second upcoming iteration
-    sprints.create!(id: 5, iid: 9, **cadence_params(auto_cadence1),
-      start_date: first_upcoming_start_date + 2.weeks, due_date: first_upcoming_start_date + 3.weeks)
-
-    sprints.create!(id: 6, iid: 1, **cadence_params(manual_cadence2),
-      start_date: Date.current, due_date: Date.current + 1.week)
-    sprints.create!(id: 7, iid: 5, **cadence_params(manual_cadence2),
-      start_date: Date.current + 2.weeks, due_date: Date.current + 3.weeks)
-  end
-
-  describe '#up' do
-    it "updates the start date of an automatic cadence to the start date of its first upcoming sprint record." do
-      expect { migration.up }
-        .to change { auto_cadence1.reload.start_date }.to(first_upcoming_start_date)
-        .and not_change { auto_cadence2.reload.start_date } # the cadence doesn't have any upcoming iteration.
-        .and not_change { auto_cadence3.reload.start_date } # the cadence is empty; it has no iterations.
-        .and not_change { manual_cadence1.reload.start_date } # manual cadence don't need to be touched.
-        .and not_change { manual_cadence2.reload.start_date } # manual cadence don't need to be touched.
-    end
-  end
-
-  describe '#down' do
-    it "updates the start date of an automatic cadence to the start date of its earliest sprint record." do
-      migration.up
-
-      expect { migration.down }
-        .to change { auto_cadence1.reload.start_date }.to(original_cadence_start_date)
-        .and not_change { auto_cadence2.reload.start_date } # the cadence is empty; it has no iterations.
-        .and not_change { manual_cadence1.reload.start_date } # manual cadence don't need to be touched.
-        .and not_change { manual_cadence2.reload.start_date } # manual cadence don't need to be touched.
-    end
-  end
-end
diff --git a/spec/migrations/20220819153725_add_vulnerability_advisory_foreign_key_to_sbom_vulnerable_component_versions_spec.rb b/spec/migrations/20220819153725_add_vulnerability_advisory_foreign_key_to_sbom_vulnerable_component_versions_spec.rb
deleted file mode 100644
index 1d18862c8ee64693764ffe7319776859105b23e7..0000000000000000000000000000000000000000
--- a/spec/migrations/20220819153725_add_vulnerability_advisory_foreign_key_to_sbom_vulnerable_component_versions_spec.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# frozen_string_literal: true
-
-require "spec_helper"
-
-require_migration!
-
-RSpec.describe AddVulnerabilityAdvisoryForeignKeyToSbomVulnerableComponentVersions,
-  feature_category: :dependency_management do
-  let(:table) { described_class::SOURCE_TABLE }
-  let(:column) { described_class::COLUMN }
-  let(:foreign_key) { -> { described_class.new.foreign_keys_for(table, column).first } }
-
-  it "creates and drops the foreign key" do
-    reversible_migration do |migration|
-      migration.before -> do
-        expect(foreign_key.call).to be(nil)
-      end
-
-      migration.after -> do
-        expect(foreign_key.call).to have_attributes(column: column.to_s)
-      end
-    end
-  end
-end
diff --git a/spec/migrations/20220819162852_add_sbom_component_version_foreign_key_to_sbom_vulnerable_component_versions_spec.rb b/spec/migrations/20220819162852_add_sbom_component_version_foreign_key_to_sbom_vulnerable_component_versions_spec.rb
deleted file mode 100644
index a280795380de9eb3458090699a96213952ef3aef..0000000000000000000000000000000000000000
--- a/spec/migrations/20220819162852_add_sbom_component_version_foreign_key_to_sbom_vulnerable_component_versions_spec.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# frozen_string_literal: true
-
-require "spec_helper"
-
-require_migration!
-
-RSpec.describe AddSbomComponentVersionForeignKeyToSbomVulnerableComponentVersions,
-  feature_category: :dependency_management do
-  let(:table) { described_class::SOURCE_TABLE }
-  let(:column) { described_class::COLUMN }
-  let(:foreign_key) { -> { described_class.new.foreign_keys_for(table, column).first } }
-
-  it "creates and drops the foreign key" do
-    reversible_migration do |migration|
-      migration.before -> do
-        expect(foreign_key.call).to be(nil)
-      end
-
-      migration.after -> do
-        expect(foreign_key.call).to have_attributes(column: column.to_s)
-      end
-    end
-  end
-end
diff --git a/spec/migrations/20220906074449_schedule_disable_legacy_open_source_license_for_projects_less_than_one_mb_spec.rb b/spec/migrations/20220906074449_schedule_disable_legacy_open_source_license_for_projects_less_than_one_mb_spec.rb
deleted file mode 100644
index 75117b6c9b1ac129ec883695ea8495701adfd563..0000000000000000000000000000000000000000
--- a/spec/migrations/20220906074449_schedule_disable_legacy_open_source_license_for_projects_less_than_one_mb_spec.rb
+++ /dev/null
@@ -1,62 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe ScheduleDisableLegacyOpenSourceLicenseForProjectsLessThanOneMb, feature_category: :groups_and_projects do
-  let!(:migration) { described_class.new }
-  let!(:post_migration) { described_class::MIGRATION }
-
-  context 'when on gitlab.com' do
-    before do
-      allow(Gitlab).to receive(:com?).and_return(true)
-    end
-
-    describe '#up' do
-      it 'schedules background jobs for each batch of project_settings' do
-        migration.up
-
-        expect(post_migration).to(
-          have_scheduled_batched_migration(
-            table_name: :project_settings,
-            column_name: :project_id,
-            interval: described_class::INTERVAL,
-            batch_size: described_class::BATCH_SIZE,
-            max_batch_size: described_class::MAX_BATCH_SIZE,
-            sub_batch_size: described_class::SUB_BATCH_SIZE
-          )
-        )
-      end
-    end
-
-    describe '#down' do
-      it 'deletes all batched migration records' do
-        migration.down
-
-        expect(post_migration).not_to have_scheduled_batched_migration
-      end
-    end
-  end
-
-  context 'when on self-managed instance' do
-    before do
-      allow(Gitlab).to receive(:com?).and_return(false)
-    end
-
-    describe '#up' do
-      it 'does not schedule background job' do
-        expect(migration).not_to receive(:queue_batched_background_migration)
-
-        migration.up
-      end
-    end
-
-    describe '#down' do
-      it 'does not delete background job' do
-        expect(migration).not_to receive(:delete_batched_background_migration)
-
-        migration.down
-      end
-    end
-  end
-end
diff --git a/spec/migrations/20220913030624_cleanup_attention_request_related_system_notes_spec.rb b/spec/migrations/20220913030624_cleanup_attention_request_related_system_notes_spec.rb
deleted file mode 100644
index 03e53a406ed065e0594bf016a947f71c2a809d17..0000000000000000000000000000000000000000
--- a/spec/migrations/20220913030624_cleanup_attention_request_related_system_notes_spec.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe CleanupAttentionRequestRelatedSystemNotes, :migration, feature_category: :team_planning do
-  let(:notes) { table(:notes) }
-  let(:system_note_metadata) { table(:system_note_metadata) }
-
-  it 'removes all notes with attention request related system_note_metadata' do
-    notes.create!(id: 1, note: 'Attention request note', noteable_type: 'MergeRequest')
-    notes.create!(id: 2, note: 'Attention request remove note', noteable_type: 'MergeRequest')
-    notes.create!(id: 3, note: 'MergeRequest note', noteable_type: 'MergeRequest')
-    notes.create!(id: 4, note: 'Commit note', noteable_type: 'Commit')
-    system_note_metadata.create!(id: 11, action: 'attention_requested', note_id: 1)
-    system_note_metadata.create!(id: 22, action: 'attention_request_removed', note_id: 2)
-    system_note_metadata.create!(id: 33, action: 'merged', note_id: 3)
-
-    expect { migrate! }.to change(notes, :count).by(-2)
-
-    expect(system_note_metadata.where(action: %w[attention_requested attention_request_removed]).size).to eq(0)
-    expect(notes.where(noteable_type: 'MergeRequest').size).to eq(1)
-    expect(notes.where(noteable_type: 'Commit').size).to eq(1)
-    expect(system_note_metadata.where(action: 'merged').size).to eq(1)
-  end
-end
diff --git a/spec/migrations/20220920124709_backfill_internal_on_notes_spec.rb b/spec/migrations/20220920124709_backfill_internal_on_notes_spec.rb
deleted file mode 100644
index 6e3a058f245b3ddbaa17a72eb536fc7bcbf3d6a1..0000000000000000000000000000000000000000
--- a/spec/migrations/20220920124709_backfill_internal_on_notes_spec.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe BackfillInternalOnNotes, :migration, feature_category: :team_planning do
-  let(:migration) { described_class::MIGRATION }
-
-  describe '#up' do
-    it 'schedules background jobs for each batch of issues' do
-      migrate!
-
-      expect(migration).to have_scheduled_batched_migration(
-        table_name: :notes,
-        column_name: :id,
-        interval: described_class::DELAY_INTERVAL,
-        batch_size: described_class::BATCH_SIZE,
-        sub_batch_size: described_class::SUB_BATCH_SIZE
-      )
-    end
-  end
-
-  describe '#down' do
-    it 'deletes all batched migration records' do
-      migrate!
-      schema_migrate_down!
-
-      expect(migration).not_to have_scheduled_batched_migration
-    end
-  end
-end
diff --git a/spec/migrations/20220921093355_schedule_backfill_namespace_details_spec.rb b/spec/migrations/20220921093355_schedule_backfill_namespace_details_spec.rb
deleted file mode 100644
index 41c4115c6a422d70d61ce2e986f2426a1cf85c10..0000000000000000000000000000000000000000
--- a/spec/migrations/20220921093355_schedule_backfill_namespace_details_spec.rb
+++ /dev/null
@@ -1,37 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe ScheduleBackfillNamespaceDetails, schema: 20220921093355, feature_category: :groups_and_projects do
-  context 'when on gitlab.com' do
-    let(:background_migration) { described_class::MIGRATION }
-    let(:migration) { described_class.new }
-
-    before do
-      migration.up
-    end
-
-    describe '#up' do
-      it 'schedules background jobs for each batch of projects' do
-        expect(background_migration).to(
-          have_scheduled_batched_migration(
-            table_name: :namespaces,
-            column_name: :id,
-            interval: described_class::INTERVAL,
-            batch_size: described_class::BATCH_SIZE,
-            sub_batch_size: described_class::SUB_BATCH_SIZE
-          )
-        )
-      end
-    end
-
-    describe '#down' do
-      it 'deletes all batched migration records' do
-        migration.down
-
-        expect(described_class::MIGRATION).not_to have_scheduled_batched_migration
-      end
-    end
-  end
-end
diff --git a/spec/migrations/20220921144258_remove_orphan_group_token_users_spec.rb b/spec/migrations/20220921144258_remove_orphan_group_token_users_spec.rb
deleted file mode 100644
index 5cfcb2eb3dd09265dd84a393cf78ed68d1c170c2..0000000000000000000000000000000000000000
--- a/spec/migrations/20220921144258_remove_orphan_group_token_users_spec.rb
+++ /dev/null
@@ -1,74 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe RemoveOrphanGroupTokenUsers, :migration, :sidekiq_inline,
-  feature_category: :system_access do
-  subject(:migration) { described_class.new }
-
-  let(:users) { table(:users) }
-  let!(:orphan_bot) do
-    create_bot(username: 'orphan_bot', email: 'orphan_bot@bot.com').tap do |bot|
-      namespaces.create!(type: 'User', path: 'n1', name: 'n1', owner_id: bot.id)
-    end
-  end
-
-  let!(:valid_used_bot) do
-    create_bot(username: 'used_bot', email: 'used_bot@bot.com').tap do |bot|
-      group = namespaces.create!(type: 'Group', path: 'used_bot_group', name: 'used_bot_group')
-      members.create!(
-        user_id: bot.id,
-        source_id: group.id,
-        member_namespace_id: group.id,
-        source_type: 'Group',
-        access_level: 10,
-        notification_level: 0
-      )
-    end
-  end
-
-  let!(:different_bot) do
-    create_bot(username: 'other_bot', email: 'other_bot@bot.com', user_type: 5)
-  end
-
-  let(:personal_access_tokens) { table(:personal_access_tokens) }
-  let(:members) { table(:members) }
-  let(:namespaces) { table(:namespaces) }
-
-  it 'initiates orphan project bot removal', :aggregate_failures do
-    expect(DeleteUserWorker)
-      .to receive(:perform_async)
-            .with(orphan_bot.id, orphan_bot.id, skip_authorization: true)
-            .and_call_original
-
-    migrate!
-
-    expect(Users::GhostUserMigration.where(user: orphan_bot)).to be_exists
-    expect(users.count).to eq 3
-    expect(personal_access_tokens.count).to eq 2
-    expect(personal_access_tokens.find_by(user_id: orphan_bot.id)).to eq nil
-  end
-
-  context "when DeleteUserWorker doesn't fit anymore" do
-    it 'removes project bot tokens only', :aggregate_failures do
-      allow(DeleteUserWorker).to receive(:respond_to?).and_call_original
-      allow(DeleteUserWorker).to receive(:respond_to?).with(:perform_async).and_return(false)
-
-      migrate!
-
-      expect(users.count).to eq 3
-      expect(personal_access_tokens.count).to eq 2
-      expect(personal_access_tokens.find_by(user_id: orphan_bot.id)).to eq nil
-    end
-  end
-
-  private
-
-  def create_bot(**params)
-    users.create!({ projects_limit: 0, state: 'active', user_type: 6 }.merge(params)).tap do |bot|
-      personal_access_tokens.create!(user_id: bot.id, name: "BOT##{bot.id}")
-    end
-  end
-end
diff --git a/spec/migrations/20220922143143_schedule_reset_duplicate_ci_runners_token_values_spec.rb b/spec/migrations/20220922143143_schedule_reset_duplicate_ci_runners_token_values_spec.rb
deleted file mode 100644
index 07627725ed0eda61ac691f45a24e6e319a7ffb7b..0000000000000000000000000000000000000000
--- a/spec/migrations/20220922143143_schedule_reset_duplicate_ci_runners_token_values_spec.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe ScheduleResetDuplicateCiRunnersTokenValues, feature_category: :runner_fleet, migration: :gitlab_ci do
-  let(:migration) { described_class::MIGRATION }
-
-  describe '#up' do
-    it 'schedules background jobs for each batch of runners' do
-      migrate!
-
-      expect(migration).to(
-        have_scheduled_batched_migration(
-          gitlab_schema: :gitlab_ci,
-          table_name: :ci_runners,
-          column_name: :id,
-          interval: described_class::DELAY_INTERVAL,
-          batch_size: described_class::BATCH_SIZE,
-          max_batch_size: described_class::MAX_BATCH_SIZE,
-          sub_batch_size: described_class::SUB_BATCH_SIZE
-        )
-      )
-    end
-  end
-
-  describe '#down' do
-    it 'deletes all batched migration records' do
-      migrate!
-      schema_migrate_down!
-
-      expect(migration).not_to have_scheduled_batched_migration
-    end
-  end
-end
diff --git a/spec/migrations/20220922143634_schedule_reset_duplicate_ci_runners_token_encrypted_values_spec.rb b/spec/migrations/20220922143634_schedule_reset_duplicate_ci_runners_token_encrypted_values_spec.rb
deleted file mode 100644
index 42f200e0d6f338fe85f0432e116a54e482fbfecc..0000000000000000000000000000000000000000
--- a/spec/migrations/20220922143634_schedule_reset_duplicate_ci_runners_token_encrypted_values_spec.rb
+++ /dev/null
@@ -1,37 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe ScheduleResetDuplicateCiRunnersTokenEncryptedValues,
-  feature_category: :runner_fleet,
-  migration: :gitlab_ci do
-  let(:migration) { described_class::MIGRATION }
-
-  describe '#up' do
-    it 'schedules background jobs for each batch of runners' do
-      migrate!
-
-      expect(migration).to(
-        have_scheduled_batched_migration(
-          gitlab_schema: :gitlab_ci,
-          table_name: :ci_runners,
-          column_name: :id,
-          interval: described_class::DELAY_INTERVAL,
-          batch_size: described_class::BATCH_SIZE,
-          max_batch_size: described_class::MAX_BATCH_SIZE,
-          sub_batch_size: described_class::SUB_BATCH_SIZE
-        )
-      )
-    end
-  end
-
-  describe '#down' do
-    it 'deletes all batched migration records' do
-      migrate!
-      schema_migrate_down!
-
-      expect(migration).not_to have_scheduled_batched_migration
-    end
-  end
-end
diff --git a/spec/migrations/20220928225711_schedule_update_ci_pipeline_artifacts_locked_status_spec.rb b/spec/migrations/20220928225711_schedule_update_ci_pipeline_artifacts_locked_status_spec.rb
deleted file mode 100644
index 085e9726663bc7bdf9b4401bb70cd6ba8429393a..0000000000000000000000000000000000000000
--- a/spec/migrations/20220928225711_schedule_update_ci_pipeline_artifacts_locked_status_spec.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe ScheduleUpdateCiPipelineArtifactsLockedStatus,
-  migration: :gitlab_ci, feature_category: :build_artifacts do
-  let!(:migration) { described_class::MIGRATION }
-
-  describe '#up' do
-    it 'schedules background jobs for each batch of ci_pipeline_artifacts' do
-      migrate!
-
-      expect(migration).to have_scheduled_batched_migration(
-        gitlab_schema: :gitlab_ci,
-        table_name: :ci_pipeline_artifacts,
-        column_name: :id,
-        batch_size: described_class::BATCH_SIZE,
-        sub_batch_size: described_class::SUB_BATCH_SIZE
-      )
-    end
-  end
-
-  describe '#down' do
-    it 'deletes all batched migration records' do
-      migrate!
-      schema_migrate_down!
-
-      expect(migration).not_to have_scheduled_batched_migration
-    end
-  end
-end
diff --git a/spec/migrations/20220929213730_schedule_delete_orphaned_operational_vulnerabilities_spec.rb b/spec/migrations/20220929213730_schedule_delete_orphaned_operational_vulnerabilities_spec.rb
deleted file mode 100644
index 2e391868060ee7e2127c7f10908e980f1932149c..0000000000000000000000000000000000000000
--- a/spec/migrations/20220929213730_schedule_delete_orphaned_operational_vulnerabilities_spec.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe ScheduleDeleteOrphanedOperationalVulnerabilities, feature_category: :vulnerability_management do
-  let!(:migration) { described_class.new }
-  let!(:post_migration) { described_class::MIGRATION }
-
-  describe '#up' do
-    it 'schedules background jobs for each batch of vulnerabilities' do
-      migration.up
-
-      expect(post_migration).to(
-        have_scheduled_batched_migration(
-          table_name: :vulnerabilities,
-          column_name: :id,
-          interval: described_class::INTERVAL,
-          batch_size: described_class::BATCH_SIZE
-        )
-      )
-    end
-  end
-
-  describe '#down' do
-    it 'deletes all batched migration records' do
-      migration.down
-
-      expect(post_migration).not_to have_scheduled_batched_migration
-    end
-  end
-end
diff --git a/spec/migrations/20221004094814_schedule_destroy_invalid_members_spec.rb b/spec/migrations/20221004094814_schedule_destroy_invalid_members_spec.rb
deleted file mode 100644
index 73896cf1cea189a63baecc6b907953a7b6d8b8d9..0000000000000000000000000000000000000000
--- a/spec/migrations/20221004094814_schedule_destroy_invalid_members_spec.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe ScheduleDestroyInvalidMembers, :migration, feature_category: :groups_and_projects do
-  let!(:migration) { described_class::MIGRATION }
-
-  describe '#up' do
-    it 'schedules background jobs for each batch of members' do
-      migrate!
-
-      expect(migration).to have_scheduled_batched_migration(
-        table_name: :members,
-        column_name: :id,
-        interval: described_class::DELAY_INTERVAL,
-        batch_size: described_class::BATCH_SIZE,
-        max_batch_size: described_class::MAX_BATCH_SIZE
-      )
-    end
-  end
-
-  describe '#down' do
-    it 'deletes all batched migration records' do
-      migrate!
-      schema_migrate_down!
-
-      expect(migration).not_to have_scheduled_batched_migration
-    end
-  end
-end
diff --git a/spec/migrations/20221008032350_add_password_expiration_migration_spec.rb b/spec/migrations/20221008032350_add_password_expiration_migration_spec.rb
deleted file mode 100644
index ee6c2aeca9c606fa498334653a65845b0eb411c9..0000000000000000000000000000000000000000
--- a/spec/migrations/20221008032350_add_password_expiration_migration_spec.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe AddPasswordExpirationMigration, feature_category: :user_profile do
-  let(:application_setting) { table(:application_settings).create! }
-
-  describe "#up" do
-    it 'allows to read password expiration fields' do
-      migrate!
-
-      expect(application_setting.password_expiration_enabled).to eq false
-      expect(application_setting.password_expires_in_days).to eq 90
-      expect(application_setting.password_expires_notice_before_days).to eq 7
-    end
-  end
-end
diff --git a/spec/migrations/20221012033107_add_password_last_changed_at_to_user_details_spec.rb b/spec/migrations/20221012033107_add_password_last_changed_at_to_user_details_spec.rb
deleted file mode 100644
index 5c228381b57057ed3115d79b0fc381c0b51878c8..0000000000000000000000000000000000000000
--- a/spec/migrations/20221012033107_add_password_last_changed_at_to_user_details_spec.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe AddPasswordLastChangedAtToUserDetails, feature_category: :user_profile do
-  let!(:namespace) { table(:namespaces).create!(name: 'user', path: 'user') }
-  let!(:users) { table(:users) }
-  let!(:user) { create_user! }
-  let(:user_detail) { table(:user_details).create!(user_id: user.id, provisioned_by_group_id: namespace.id) }
-
-  describe "#up" do
-    it 'allows to read password_last_changed_at' do
-      migrate!
-
-      expect(user_detail.password_last_changed_at).to eq nil
-    end
-  end
-
-  private
-
-  def create_user!(name: "Example User", email: "user@example.com", user_type: nil)
-    users.create!(
-      name: name,
-      email: email,
-      username: name,
-      projects_limit: 0,
-      user_type: user_type,
-      confirmed_at: Time.current
-    )
-  end
-end
diff --git a/spec/migrations/20221013154159_update_invalid_dormant_user_setting_spec.rb b/spec/migrations/20221013154159_update_invalid_dormant_user_setting_spec.rb
deleted file mode 100644
index ad644b63060f6b8371a87bffb5c3c204608ef313..0000000000000000000000000000000000000000
--- a/spec/migrations/20221013154159_update_invalid_dormant_user_setting_spec.rb
+++ /dev/null
@@ -1,40 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe UpdateInvalidDormantUserSetting, :migration, feature_category: :user_profile do
-  let(:settings) { table(:application_settings) }
-
-  context 'with no rows in the application_settings table' do
-    it 'does not insert a row' do
-      expect { migrate! }.to not_change { settings.count }
-    end
-  end
-
-  context 'with a row in the application_settings table' do
-    before do
-      settings.create!(deactivate_dormant_users_period: days)
-    end
-
-    context 'with deactivate_dormant_users_period set to a value greater than or equal to 90' do
-      let(:days) { 90 }
-
-      it 'does not update the row' do
-        expect { migrate! }
-          .to not_change { settings.count }
-          .and not_change { settings.first.deactivate_dormant_users_period }
-      end
-    end
-
-    context 'with deactivate_dormant_users_period set to a value less than or equal to 90' do
-      let(:days) { 1 }
-
-      it 'updates the existing row' do
-        expect { migrate! }
-          .to not_change { settings.count }
-          .and change { settings.first.deactivate_dormant_users_period }
-      end
-    end
-  end
-end
diff --git a/spec/migrations/add_epics_relative_position_spec.rb b/spec/migrations/add_epics_relative_position_spec.rb
deleted file mode 100644
index bdfaacc2bf81a67ecd4d2bace00fc3bae6231c34..0000000000000000000000000000000000000000
--- a/spec/migrations/add_epics_relative_position_spec.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe AddEpicsRelativePosition, :migration, feature_category: :portfolio_management do
-  let(:groups) { table(:namespaces) }
-  let(:epics) { table(:epics) }
-  let(:users) { table(:users) }
-  let(:user) { users.create!(name: 'user', email: 'email@example.org', projects_limit: 100) }
-  let(:group) { groups.create!(name: 'gitlab', path: 'gitlab-org', type: 'Group') }
-
-  let!(:epic1) { epics.create!(title: 'epic 1', title_html: 'epic 1', author_id: user.id, group_id: group.id, iid: 1) }
-  let!(:epic2) { epics.create!(title: 'epic 2', title_html: 'epic 2', author_id: user.id, group_id: group.id, iid: 2) }
-  let!(:epic3) { epics.create!(title: 'epic 3', title_html: 'epic 3', author_id: user.id, group_id: group.id, iid: 3) }
-
-  it 'does nothing if epics table contains relative_position' do
-    expect { migrate! }.not_to change { epics.pluck(:relative_position) }
-  end
-
-  it 'adds relative_position if missing and backfills it with ID value', :aggregate_failures do
-    ActiveRecord::Base.connection.execute('ALTER TABLE epics DROP relative_position')
-
-    migrate!
-
-    expect(epics.pluck(:relative_position)).to match_array([epic1.id * 500, epic2.id * 500, epic3.id * 500])
-  end
-end
diff --git a/spec/migrations/add_web_hook_calls_to_plan_limits_paid_tiers_spec.rb b/spec/migrations/add_web_hook_calls_to_plan_limits_paid_tiers_spec.rb
deleted file mode 100644
index 0ad99be1c7bcf266c0a48675ab324cc9dd766b4d..0000000000000000000000000000000000000000
--- a/spec/migrations/add_web_hook_calls_to_plan_limits_paid_tiers_spec.rb
+++ /dev/null
@@ -1,101 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe AddWebHookCallsToPlanLimitsPaidTiers, feature_category: :purchase do
-  let!(:plans) { table(:plans) }
-  let!(:plan_limits) { table(:plan_limits) }
-
-  context 'when on Gitlab.com' do
-    let(:free_plan) { plans.create!(name: 'free') }
-    let(:bronze_plan) { plans.create!(name: 'bronze') }
-    let(:silver_plan) { plans.create!(name: 'silver') }
-    let(:gold_plan) { plans.create!(name: 'gold') }
-    let(:premium_plan) { plans.create!(name: 'premium') }
-    let(:premium_trial_plan) { plans.create!(name: 'premium_trial') }
-    let(:ultimate_plan) { plans.create!(name: 'ultimate') }
-    let(:ultimate_trial_plan) { plans.create!(name: 'ultimate_trial') }
-    let(:opensource_plan) { plans.create!(name: 'opensource') }
-
-    before do
-      allow(Gitlab).to receive(:com?).and_return(true)
-      # 120 is the value for 'free' migrated in `db/migrate/20210601131742_update_web_hook_calls_limit.rb`
-      plan_limits.create!(plan_id: free_plan.id, web_hook_calls: 120)
-      plan_limits.create!(plan_id: bronze_plan.id)
-      plan_limits.create!(plan_id: silver_plan.id)
-      plan_limits.create!(plan_id: gold_plan.id)
-      plan_limits.create!(plan_id: premium_plan.id)
-      plan_limits.create!(plan_id: premium_trial_plan.id)
-      plan_limits.create!(plan_id: ultimate_plan.id)
-      plan_limits.create!(plan_id: ultimate_trial_plan.id)
-      plan_limits.create!(plan_id: opensource_plan.id)
-    end
-
-    it 'correctly migrates up and down' do
-      reversible_migration do |migration|
-        migration.before -> {
-          expect(
-            plan_limits.pluck(:plan_id, :web_hook_calls, :web_hook_calls_mid, :web_hook_calls_low)
-          ).to contain_exactly(
-            [free_plan.id, 120, 0, 0],
-            [bronze_plan.id, 0, 0, 0],
-            [silver_plan.id, 0, 0, 0],
-            [gold_plan.id, 0, 0, 0],
-            [premium_plan.id, 0, 0, 0],
-            [premium_trial_plan.id, 0, 0, 0],
-            [ultimate_plan.id, 0, 0, 0],
-            [ultimate_trial_plan.id, 0, 0, 0],
-            [opensource_plan.id, 0, 0, 0]
-          )
-        }
-
-        migration.after -> {
-          expect(
-            plan_limits.pluck(:plan_id, :web_hook_calls, :web_hook_calls_mid, :web_hook_calls_low)
-          ).to contain_exactly(
-            [free_plan.id, 500, 500, 500],
-            [bronze_plan.id, 4_000, 2_800, 1_600],
-            [silver_plan.id, 4_000, 2_800, 1_600],
-            [gold_plan.id, 13_000, 9_000, 6_000],
-            [premium_plan.id, 4_000, 2_800, 1_600],
-            [premium_trial_plan.id, 4_000, 2_800, 1_600],
-            [ultimate_plan.id, 13_000, 9_000, 6_000],
-            [ultimate_trial_plan.id, 13_000, 9_000, 6_000],
-            [opensource_plan.id, 13_000, 9_000, 6_000]
-          )
-        }
-      end
-    end
-  end
-
-  context 'when on self hosted' do
-    let(:default_plan) { plans.create!(name: 'default') }
-
-    before do
-      allow(Gitlab).to receive(:com?).and_return(false)
-
-      plan_limits.create!(plan_id: default_plan.id)
-    end
-
-    it 'does nothing' do
-      reversible_migration do |migration|
-        migration.before -> {
-          expect(
-            plan_limits.pluck(:plan_id, :web_hook_calls, :web_hook_calls_mid, :web_hook_calls_low)
-          ).to contain_exactly(
-            [default_plan.id, 0, 0, 0]
-          )
-        }
-
-        migration.after -> {
-          expect(
-            plan_limits.pluck(:plan_id, :web_hook_calls, :web_hook_calls_mid, :web_hook_calls_low)
-          ).to contain_exactly(
-            [default_plan.id, 0, 0, 0]
-          )
-        }
-      end
-    end
-  end
-end
diff --git a/spec/migrations/adjust_task_note_rename_background_migration_values_spec.rb b/spec/migrations/adjust_task_note_rename_background_migration_values_spec.rb
deleted file mode 100644
index 01680fa12cc358e9ddc56539225a5d15bb32a800..0000000000000000000000000000000000000000
--- a/spec/migrations/adjust_task_note_rename_background_migration_values_spec.rb
+++ /dev/null
@@ -1,143 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe AdjustTaskNoteRenameBackgroundMigrationValues, :migration, feature_category: :team_planning do
-  let(:finished_status) { 3 }
-  let(:failed_status) { described_class::MIGRATION_FAILED_STATUS }
-  let(:active_status) { described_class::MIGRATION_ACTIVE_STATUS }
-
-  shared_examples 'task note migration with failing batches' do
-    it 'updates batch sizes and resets failed batches' do
-      migration = create_background_migration(status: initial_status)
-      batches = []
-
-      batches << create_failed_batched_job(migration)
-      batches << create_failed_batched_job(migration)
-
-      migrate!
-
-      expect(described_class::JOB_CLASS_NAME).to have_scheduled_batched_migration(
-        table_name: :system_note_metadata,
-        column_name: :id,
-        interval: 2.minutes,
-        batch_size: described_class::NEW_BATCH_SIZE,
-        max_batch_size: 20_000,
-        sub_batch_size: described_class::NEW_SUB_BATCH_SIZE
-      )
-      expect(migration.reload.status).to eq(active_status)
-
-      updated_batches = batches.map { |b| b.reload.attributes.slice('attempts', 'sub_batch_size') }
-      expect(updated_batches).to all(eq("attempts" => 0, "sub_batch_size" => 10))
-    end
-  end
-
-  describe '#up' do
-    context 'when migration was already finished' do
-      it 'does not update batch sizes' do
-        create_background_migration(status: finished_status)
-
-        migrate!
-
-        expect(described_class::JOB_CLASS_NAME).to have_scheduled_batched_migration(
-          table_name: :system_note_metadata,
-          column_name: :id,
-          interval: 2.minutes,
-          batch_size: described_class::OLD_BATCH_SIZE,
-          max_batch_size: 20_000,
-          sub_batch_size: described_class::OLD_SUB_BATCH_SIZE
-        )
-      end
-    end
-
-    context 'when the migration had failing batches' do
-      context 'when migration had a failed status' do
-        it_behaves_like 'task note migration with failing batches' do
-          let(:initial_status) { failed_status }
-        end
-
-        it 'updates started_at timestamp' do
-          migration = create_background_migration(status: failed_status)
-          now = Time.zone.now
-
-          travel_to now do
-            migrate!
-            migration.reload
-          end
-
-          expect(migration.started_at).to be_like_time(now)
-        end
-      end
-
-      context 'when migration had an active status' do
-        it_behaves_like 'task note migration with failing batches' do
-          let(:initial_status) { active_status }
-        end
-
-        it 'does not update started_at timestamp' do
-          migration = create_background_migration(status: active_status)
-          original_time = migration.started_at
-
-          migrate!
-          migration.reload
-
-          expect(migration.started_at).to be_like_time(original_time)
-        end
-      end
-    end
-  end
-
-  describe '#down' do
-    it 'reverts to old batch sizes' do
-      create_background_migration(status: finished_status)
-
-      migrate!
-      schema_migrate_down!
-
-      expect(described_class::JOB_CLASS_NAME).to have_scheduled_batched_migration(
-        table_name: :system_note_metadata,
-        column_name: :id,
-        interval: 2.minutes,
-        batch_size: described_class::OLD_BATCH_SIZE,
-        max_batch_size: 20_000,
-        sub_batch_size: described_class::OLD_SUB_BATCH_SIZE
-      )
-    end
-  end
-
-  def create_failed_batched_job(migration)
-    table(:batched_background_migration_jobs).create!(
-      batched_background_migration_id: migration.id,
-      status: described_class::JOB_FAILED_STATUS,
-      min_value: 1,
-      max_value: 10,
-      attempts: 3,
-      batch_size: described_class::OLD_BATCH_SIZE,
-      sub_batch_size: described_class::OLD_SUB_BATCH_SIZE
-    )
-  end
-
-  def create_background_migration(status:)
-    migrations_table = table(:batched_background_migrations)
-    # make sure we only have on migration with that job class name in the specs
-    migrations_table.where(job_class_name: described_class::JOB_CLASS_NAME).delete_all
-
-    migrations_table.create!(
-      job_class_name: described_class::JOB_CLASS_NAME,
-      status: status,
-      max_value: 10,
-      max_batch_size: 20_000,
-      batch_size: described_class::OLD_BATCH_SIZE,
-      sub_batch_size: described_class::OLD_SUB_BATCH_SIZE,
-      interval: 2.minutes,
-      table_name: :system_note_metadata,
-      column_name: :id,
-      total_tuple_count: 100_000,
-      pause_ms: 100,
-      gitlab_schema: :gitlab_main,
-      job_arguments: [],
-      started_at: 2.days.ago
-    )
-  end
-end
diff --git a/spec/migrations/backfill_all_project_namespaces_spec.rb b/spec/migrations/backfill_all_project_namespaces_spec.rb
deleted file mode 100644
index 5cd499a2988dfd5e44bb060ec03d4f804b39eaa5..0000000000000000000000000000000000000000
--- a/spec/migrations/backfill_all_project_namespaces_spec.rb
+++ /dev/null
@@ -1,37 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe BackfillAllProjectNamespaces, :migration, feature_category: :groups_and_projects do
-  let!(:migration) { described_class::MIGRATION }
-
-  let(:projects) { table(:projects) }
-  let(:namespaces) { table(:namespaces) }
-  let(:user_namespace) { namespaces.create!(name: 'user1', path: 'user1', visibility_level: 20, type: 'User') }
-  let(:parent_group1) { namespaces.create!(name: 'parent_group1', path: 'parent_group1', visibility_level: 20, type: 'Group') }
-  let!(:parent_group1_project) { projects.create!(name: 'parent_group1_project', path: 'parent_group1_project', namespace_id: parent_group1.id, visibility_level: 20) }
-  let!(:user_namespace_project) { projects.create!(name: 'user1_project', path: 'user1_project', namespace_id: user_namespace.id, visibility_level: 20) }
-
-  describe '#up' do
-    it 'schedules background jobs for each batch of namespaces' do
-      migrate!
-
-      expect(migration).to have_scheduled_batched_migration(
-        table_name: :projects,
-        column_name: :id,
-        job_arguments: [nil, 'up'],
-        interval: described_class::DELAY_INTERVAL
-      )
-    end
-  end
-
-  describe '#down' do
-    it 'deletes all batched migration records' do
-      migrate!
-      schema_migrate_down!
-
-      expect(migration).not_to have_scheduled_batched_migration
-    end
-  end
-end
diff --git a/spec/migrations/backfill_cycle_analytics_aggregations_spec.rb b/spec/migrations/backfill_cycle_analytics_aggregations_spec.rb
deleted file mode 100644
index 47950f918c31c02a5ecd09241d518ad577599748..0000000000000000000000000000000000000000
--- a/spec/migrations/backfill_cycle_analytics_aggregations_spec.rb
+++ /dev/null
@@ -1,36 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe BackfillCycleAnalyticsAggregations, :migration, feature_category: :value_stream_management do
-  let(:migration) { described_class.new }
-
-  let(:aggregations) { table(:analytics_cycle_analytics_aggregations) }
-  let(:namespaces) { table(:namespaces) }
-  let(:group_value_streams) { table(:analytics_cycle_analytics_group_value_streams) }
-
-  context 'when there are value stream records' do
-    it 'inserts a record for each top-level namespace' do
-      group1 = namespaces.create!(path: 'aaa', name: 'aaa')
-      subgroup1 = namespaces.create!(path: 'bbb', name: 'bbb', parent_id: group1.id)
-      group2 = namespaces.create!(path: 'ccc', name: 'ccc')
-
-      namespaces.create!(path: 'ddd', name: 'ddd') # not used
-
-      group_value_streams.create!(name: 'for top level group', group_id: group2.id)
-      group_value_streams.create!(name: 'another for top level group', group_id: group2.id)
-
-      group_value_streams.create!(name: 'for subgroup', group_id: subgroup1.id)
-      group_value_streams.create!(name: 'another for subgroup', group_id: subgroup1.id)
-
-      migrate!
-
-      expect(aggregations.pluck(:group_id)).to match_array([group1.id, group2.id])
-    end
-  end
-
-  it 'does nothing' do
-    expect { migrate! }.not_to change { aggregations.count }
-  end
-end
diff --git a/spec/migrations/backfill_epic_cache_counts_spec.rb b/spec/migrations/backfill_epic_cache_counts_spec.rb
deleted file mode 100644
index 1dc0079bb010fb28de824320f9e8b51a6454ebbd..0000000000000000000000000000000000000000
--- a/spec/migrations/backfill_epic_cache_counts_spec.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe BackfillEpicCacheCounts, :migration, feature_category: :portfolio_management do
-  let(:migration) { described_class::MIGRATION }
-
-  describe '#up' do
-    it 'schedules a batched background migration' do
-      migrate!
-
-      expect(migration).to have_scheduled_batched_migration(
-        table_name: :epics,
-        column_name: :id,
-        interval: described_class::DELAY_INTERVAL,
-        batch_size: described_class::BATCH_SIZE,
-        max_batch_size: described_class::MAX_BATCH_SIZE,
-        sub_batch_size: described_class::SUB_BATCH_SIZE
-      )
-    end
-  end
-
-  describe '#down' do
-    it 'deletes all batched migration records' do
-      migrate!
-      schema_migrate_down!
-
-      expect(migration).not_to have_scheduled_batched_migration
-    end
-  end
-end
diff --git a/spec/migrations/backfill_group_features_spec.rb b/spec/migrations/backfill_group_features_spec.rb
deleted file mode 100644
index 1e7729a97d84f62471784439e1af85d5abd31ac1..0000000000000000000000000000000000000000
--- a/spec/migrations/backfill_group_features_spec.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe BackfillGroupFeatures, :migration, feature_category: :feature_flags do
-  let(:migration) { described_class::MIGRATION }
-
-  describe '#up' do
-    it 'schedules background jobs for each batch of namespaces' do
-      migrate!
-
-      expect(migration).to have_scheduled_batched_migration(
-        table_name: :namespaces,
-        column_name: :id,
-        job_arguments: [described_class::BATCH_SIZE],
-        interval: described_class::INTERVAL,
-        batch_size: described_class::BATCH_SIZE
-      )
-    end
-  end
-
-  describe '#down' do
-    it 'deletes all batched migration records' do
-      migrate!
-      schema_migrate_down!
-
-      expect(migration).not_to have_scheduled_batched_migration
-    end
-  end
-end
diff --git a/spec/migrations/backfill_integrations_enable_ssl_verification_spec.rb b/spec/migrations/backfill_integrations_enable_ssl_verification_spec.rb
deleted file mode 100644
index 83b47da3065eb3b9d672f5c65758ed7a00840ae5..0000000000000000000000000000000000000000
--- a/spec/migrations/backfill_integrations_enable_ssl_verification_spec.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe BackfillIntegrationsEnableSslVerification, feature_category: :system_access do
-  let!(:migration) { described_class::MIGRATION }
-  let!(:integrations) { described_class::Integration }
-
-  before do
-    stub_const("#{described_class.name}::BATCH_SIZE", 2)
-
-    integrations.create!(id: 1, type_new: 'Integrations::DroneCi')
-    integrations.create!(id: 2, type_new: 'Integrations::DroneCi', properties: {})
-    integrations.create!(id: 3, type_new: 'Integrations::Bamboo', properties: {})
-    integrations.create!(id: 4, type_new: 'Integrations::Teamcity', properties: {})
-    integrations.create!(id: 5, type_new: 'Integrations::DroneCi', properties: {})
-    integrations.create!(id: 6, type_new: 'Integrations::Teamcity', properties: {})
-  end
-
-  describe '#up' do
-    it 'schedules background jobs for each batch of integrations', :freeze_time do
-      Sidekiq::Testing.fake! do
-        migrate!
-
-        expect(BackgroundMigrationWorker.jobs.size).to eq(2)
-        expect(migration).to be_scheduled_delayed_migration(5.minutes, 2, 4)
-        expect(migration).to be_scheduled_delayed_migration(10.minutes, 5, 6)
-      end
-    end
-  end
-end
diff --git a/spec/migrations/backfill_member_namespace_id_for_group_members_spec.rb b/spec/migrations/backfill_member_namespace_id_for_group_members_spec.rb
deleted file mode 100644
index da6ddfe808e74f49bd88ff41a53cdb98c8ce2bb5..0000000000000000000000000000000000000000
--- a/spec/migrations/backfill_member_namespace_id_for_group_members_spec.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe BackfillMemberNamespaceIdForGroupMembers, feature_category: :groups_and_projects do
-  let!(:migration) { described_class::MIGRATION }
-
-  describe '#up' do
-    it 'schedules background jobs for each batch of group members' do
-      migrate!
-
-      expect(migration).to have_scheduled_batched_migration(
-        table_name: :members,
-        column_name: :id,
-        interval: described_class::INTERVAL
-      )
-    end
-  end
-
-  describe '#down' do
-    it 'deletes all batched migration records' do
-      migrate!
-      schema_migrate_down!
-
-      expect(migration).not_to have_scheduled_batched_migration
-    end
-  end
-end
diff --git a/spec/migrations/backfill_namespace_id_for_namespace_routes_spec.rb b/spec/migrations/backfill_namespace_id_for_namespace_routes_spec.rb
deleted file mode 100644
index 8fef4cdc806bf63094ee2f89c74d7f05fe35a7de..0000000000000000000000000000000000000000
--- a/spec/migrations/backfill_namespace_id_for_namespace_routes_spec.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe BackfillNamespaceIdForNamespaceRoutes, feature_category: :groups_and_projects do
-  let!(:migration) { described_class::MIGRATION }
-
-  describe '#up' do
-    it 'schedules background jobs for each batch of routes' do
-      migrate!
-
-      expect(migration).to have_scheduled_batched_migration(
-        table_name: :routes,
-        column_name: :id,
-        interval: described_class::INTERVAL
-      )
-    end
-  end
-
-  describe '#down' do
-    it 'deletes all batched migration records' do
-      migrate!
-      schema_migrate_down!
-
-      expect(migration).not_to have_scheduled_batched_migration
-    end
-  end
-end
diff --git a/spec/migrations/backfill_namespace_id_for_project_routes_spec.rb b/spec/migrations/backfill_namespace_id_for_project_routes_spec.rb
deleted file mode 100644
index 998d5e88b9deea099ea73c11cc067bb1e8beecf1..0000000000000000000000000000000000000000
--- a/spec/migrations/backfill_namespace_id_for_project_routes_spec.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe BackfillNamespaceIdForProjectRoutes, :migration, feature_category: :groups_and_projects do
-  let(:migration) { described_class::MIGRATION }
-
-  describe '#up' do
-    it 'schedules background jobs for each batch of group members' do
-      migrate!
-
-      expect(migration).to have_scheduled_batched_migration(
-        table_name: :routes,
-        column_name: :id,
-        interval: described_class::INTERVAL
-      )
-    end
-  end
-
-  describe '#down' do
-    it 'deletes all batched migration records' do
-      migrate!
-      schema_migrate_down!
-
-      expect(migration).not_to have_scheduled_batched_migration
-    end
-  end
-end
diff --git a/spec/migrations/backfill_namespace_id_on_issues_spec.rb b/spec/migrations/backfill_namespace_id_on_issues_spec.rb
deleted file mode 100644
index 28453394cb00f3ac953b1730f9353c0078ed7def..0000000000000000000000000000000000000000
--- a/spec/migrations/backfill_namespace_id_on_issues_spec.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe BackfillNamespaceIdOnIssues, :migration, feature_category: :team_planning do
-  let(:migration) { described_class::MIGRATION }
-
-  describe '#up' do
-    it 'schedules background jobs for each batch of issues' do
-      migrate!
-
-      expect(migration).to have_scheduled_batched_migration(
-        table_name: :issues,
-        column_name: :id,
-        interval: described_class::DELAY_INTERVAL,
-        batch_size: described_class::BATCH_SIZE,
-        max_batch_size: described_class::MAX_BATCH_SIZE,
-        sub_batch_size: described_class::SUB_BATCH_SIZE
-      )
-    end
-  end
-
-  describe '#down' do
-    it 'deletes all batched migration records' do
-      migrate!
-      schema_migrate_down!
-
-      expect(migration).not_to have_scheduled_batched_migration
-    end
-  end
-end
diff --git a/spec/migrations/backfill_project_import_level_spec.rb b/spec/migrations/backfill_project_import_level_spec.rb
deleted file mode 100644
index b41e323a92fb943b1ca6dec8a95cc175b774985f..0000000000000000000000000000000000000000
--- a/spec/migrations/backfill_project_import_level_spec.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe BackfillProjectImportLevel, feature_category: :importers do
-  let!(:batched_migration) { described_class::MIGRATION }
-
-  describe '#up' do
-    it 'schedules background jobs for each batch of namespaces' do
-      migrate!
-
-      expect(batched_migration).to have_scheduled_batched_migration(
-        table_name: :namespaces,
-        column_name: :id,
-        interval: described_class::INTERVAL
-      )
-    end
-  end
-
-  describe '#down' do
-    it 'deletes all batched migration records' do
-      migrate!
-      schema_migrate_down!
-
-      expect(batched_migration).not_to have_scheduled_batched_migration
-    end
-  end
-end
diff --git a/spec/migrations/backfill_project_namespaces_for_group_spec.rb b/spec/migrations/backfill_project_namespaces_for_group_spec.rb
deleted file mode 100644
index 5f69e37a2addae24a1a9595579221c4696433f51..0000000000000000000000000000000000000000
--- a/spec/migrations/backfill_project_namespaces_for_group_spec.rb
+++ /dev/null
@@ -1,43 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe BackfillProjectNamespacesForGroup, feature_category: :groups_and_projects do
-  let!(:migration) { described_class::MIGRATION }
-
-  let(:projects) { table(:projects) }
-  let(:namespaces) { table(:namespaces) }
-  let(:parent_group1) { namespaces.create!(name: 'parent_group1', path: 'parent_group1', visibility_level: 20, type: 'Group') }
-  let!(:parent_group1_project) { projects.create!(name: 'parent_group1_project', path: 'parent_group1_project', namespace_id: parent_group1.id, visibility_level: 20) }
-
-  before do
-    allow(Gitlab).to receive(:com?).and_return(true)
-  end
-
-  describe '#up' do
-    before do
-      stub_const("BackfillProjectNamespacesForGroup::GROUP_ID", parent_group1.id)
-    end
-
-    it 'schedules background jobs for each batch of namespaces' do
-      migrate!
-
-      expect(migration).to have_scheduled_batched_migration(
-        table_name: :projects,
-        column_name: :id,
-        job_arguments: [described_class::GROUP_ID, 'up'],
-        interval: described_class::DELAY_INTERVAL
-      )
-    end
-  end
-
-  describe '#down' do
-    it 'deletes all batched migration records' do
-      migrate!
-      schema_migrate_down!
-
-      expect(migration).not_to have_scheduled_batched_migration
-    end
-  end
-end
diff --git a/spec/migrations/bulk_insert_cluster_enabled_grants_spec.rb b/spec/migrations/bulk_insert_cluster_enabled_grants_spec.rb
deleted file mode 100644
index 71ffdd66d6219affc3b2b11118824a776db4afb3..0000000000000000000000000000000000000000
--- a/spec/migrations/bulk_insert_cluster_enabled_grants_spec.rb
+++ /dev/null
@@ -1,85 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe BulkInsertClusterEnabledGrants, :migration, feature_category: :deployment_management do
-  let(:migration) { described_class.new }
-
-  let(:cluster_enabled_grants) { table(:cluster_enabled_grants) }
-  let(:namespaces) { table(:namespaces) }
-  let(:cluster_projects) { table(:cluster_projects) }
-  let(:cluster_groups) { table(:cluster_groups) }
-  let(:clusters) { table(:clusters) }
-  let(:projects) { table(:projects) }
-
-  context 'with namespaces, cluster_groups and cluster_projects' do
-    it 'creates unique cluster_enabled_grants for root_namespaces with clusters' do
-      # Does not create grants for namespaces without clusters
-      namespaces.create!(id: 1, path: 'eee', name: 'eee', traversal_ids: [1]) # not used
-
-      # Creates unique grant for a root namespace with its own cluster
-      root_ns_with_own_cluster = namespaces.create!(id: 2, path: 'ddd', name: 'ddd', traversal_ids: [2])
-      cluster_root_ns_with_own_cluster = clusters.create!(name: 'cluster_root_ns_with_own_cluster')
-      cluster_groups.create!(
-        cluster_id: cluster_root_ns_with_own_cluster.id,
-        group_id: root_ns_with_own_cluster.id)
-
-      # Creates unique grant for namespaces with multiple sub-group clusters
-      root_ns_with_sub_group_clusters = namespaces.create!(id: 3, path: 'aaa', name: 'aaa', traversal_ids: [3])
-
-      subgroup_1 = namespaces.create!(
-        id: 4,
-        path: 'bbb',
-        name: 'bbb',
-        parent_id: root_ns_with_sub_group_clusters.id,
-        traversal_ids: [root_ns_with_sub_group_clusters.id, 4])
-      cluster_subgroup_1 = clusters.create!(name: 'cluster_subgroup_1')
-      cluster_groups.create!(cluster_id: cluster_subgroup_1.id, group_id: subgroup_1.id)
-
-      subgroup_2 = namespaces.create!(
-        id: 5,
-        path: 'ccc',
-        name: 'ccc',
-        parent_id: subgroup_1.id,
-        traversal_ids: [root_ns_with_sub_group_clusters.id, subgroup_1.id, 5])
-      cluster_subgroup_2 = clusters.create!(name: 'cluster_subgroup_2')
-      cluster_groups.create!(cluster_id: cluster_subgroup_2.id, group_id: subgroup_2.id)
-
-      # Creates unique grant for a root namespace with multiple projects clusters
-      root_ns_with_project_group_clusters = namespaces.create!(id: 6, path: 'fff', name: 'fff', traversal_ids: [6])
-
-      project_namespace_1 = namespaces.create!(id: 7, path: 'ggg', name: 'ggg', traversal_ids: [7])
-      project_1 = projects.create!(
-        name: 'project_1',
-        namespace_id: root_ns_with_project_group_clusters.id,
-        project_namespace_id: project_namespace_1.id)
-      cluster_project_1 = clusters.create!(name: 'cluster_project_1')
-      cluster_projects.create!(cluster_id: cluster_project_1.id, project_id: project_1.id)
-
-      project_namespace_2 = namespaces.create!(id: 8, path: 'hhh', name: 'hhh', traversal_ids: [8])
-      project_2 = projects.create!(
-        name: 'project_2',
-        namespace_id: root_ns_with_project_group_clusters.id,
-        project_namespace_id: project_namespace_2.id)
-      cluster_project_2 = clusters.create!(name: 'cluster_project_2')
-      cluster_projects.create!(cluster_id: cluster_project_2.id, project_id: project_2.id)
-
-      migrate!
-
-      expected_cluster_enabled_grants = [
-        root_ns_with_sub_group_clusters.id,
-        root_ns_with_own_cluster.id,
-        root_ns_with_project_group_clusters.id
-      ]
-
-      expect(cluster_enabled_grants.pluck(:namespace_id)).to match_array(expected_cluster_enabled_grants)
-    end
-  end
-
-  context 'without namespaces, cluster_groups or cluster_projects' do
-    it 'does nothing' do
-      expect { migrate! }.not_to change { cluster_enabled_grants.count }
-    end
-  end
-end
diff --git a/spec/migrations/change_public_projects_cost_factor_spec.rb b/spec/migrations/change_public_projects_cost_factor_spec.rb
deleted file mode 100644
index 656c8a45c57a42b1a0c87590b815d6f82223e366..0000000000000000000000000000000000000000
--- a/spec/migrations/change_public_projects_cost_factor_spec.rb
+++ /dev/null
@@ -1,59 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe ChangePublicProjectsCostFactor, migration: :gitlab_ci, feature_category: :runner do
-  let(:runners) { table(:ci_runners) }
-
-  let!(:shared_1) { runners.create!(runner_type: 1, public_projects_minutes_cost_factor: 0) }
-  let!(:shared_2) { runners.create!(runner_type: 1, public_projects_minutes_cost_factor: 0) }
-  let!(:shared_3) { runners.create!(runner_type: 1, public_projects_minutes_cost_factor: 1) }
-  let!(:group_1)  { runners.create!(runner_type: 2, public_projects_minutes_cost_factor: 0) }
-
-  describe '#up' do
-    context 'when on SaaS' do
-      before do
-        allow(Gitlab).to receive(:com?).and_return(true)
-      end
-
-      it 'updates the cost factor from 0 only for shared runners', :aggregate_failures do
-        migrate!
-
-        expect(shared_1.reload.public_projects_minutes_cost_factor).to eq(0.008)
-        expect(shared_2.reload.public_projects_minutes_cost_factor).to eq(0.008)
-        expect(shared_3.reload.public_projects_minutes_cost_factor).to eq(1)
-        expect(group_1.reload.public_projects_minutes_cost_factor).to eq(0)
-      end
-    end
-
-    context 'when on self-managed', :aggregate_failures do
-      it 'skips the migration' do
-        migrate!
-
-        expect(shared_1.public_projects_minutes_cost_factor).to eq(0)
-        expect(shared_2.public_projects_minutes_cost_factor).to eq(0)
-        expect(shared_3.public_projects_minutes_cost_factor).to eq(1)
-        expect(group_1.public_projects_minutes_cost_factor).to eq(0)
-      end
-    end
-  end
-
-  describe '#down' do
-    context 'when on SaaS' do
-      before do
-        allow(Gitlab).to receive(:com?).and_return(true)
-      end
-
-      it 'resets the cost factor to 0 only for shared runners that were updated', :aggregate_failures do
-        migrate!
-        schema_migrate_down!
-
-        expect(shared_1.public_projects_minutes_cost_factor).to eq(0)
-        expect(shared_2.public_projects_minutes_cost_factor).to eq(0)
-        expect(shared_3.public_projects_minutes_cost_factor).to eq(1)
-        expect(group_1.public_projects_minutes_cost_factor).to eq(0)
-      end
-    end
-  end
-end
diff --git a/spec/migrations/change_task_system_note_wording_to_checklist_item_spec.rb b/spec/migrations/change_task_system_note_wording_to_checklist_item_spec.rb
deleted file mode 100644
index 421c519b2bcb46d3dc649a5fb2776986c680bd98..0000000000000000000000000000000000000000
--- a/spec/migrations/change_task_system_note_wording_to_checklist_item_spec.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe ChangeTaskSystemNoteWordingToChecklistItem, :migration, feature_category: :team_planning do
-  let(:migration) { described_class::MIGRATION }
-
-  describe '#up' do
-    it 'schedules a batched background migration' do
-      migrate!
-
-      expect(migration).to have_scheduled_batched_migration(
-        table_name: :system_note_metadata,
-        column_name: :id,
-        interval: described_class::DELAY_INTERVAL,
-        batch_size: described_class::BATCH_SIZE,
-        max_batch_size: described_class::MAX_BATCH_SIZE,
-        sub_batch_size: described_class::SUB_BATCH_SIZE
-      )
-    end
-  end
-
-  describe '#down' do
-    it 'deletes all batched migration records' do
-      migrate!
-      schema_migrate_down!
-
-      expect(migration).not_to have_scheduled_batched_migration
-    end
-  end
-end
diff --git a/spec/migrations/cleanup_after_fixing_issue_when_admin_changed_primary_email_spec.rb b/spec/migrations/cleanup_after_fixing_issue_when_admin_changed_primary_email_spec.rb
deleted file mode 100644
index 7c9d2e3170a7ed61b6e186ae9e76e800c8c25cdc..0000000000000000000000000000000000000000
--- a/spec/migrations/cleanup_after_fixing_issue_when_admin_changed_primary_email_spec.rb
+++ /dev/null
@@ -1,40 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe CleanupAfterFixingIssueWhenAdminChangedPrimaryEmail, :sidekiq, feature_category: :user_profile do
-  let(:migration) { described_class.new }
-  let(:users) { table(:users) }
-  let(:emails) { table(:emails) }
-
-  let!(:user_1) { users.create!(name: 'confirmed-user-1', email: 'confirmed-1@example.com', confirmed_at: 3.days.ago, projects_limit: 100) }
-  let!(:user_2) { users.create!(name: 'confirmed-user-2', email: 'confirmed-2@example.com', confirmed_at: 1.day.ago, projects_limit: 100) }
-  let!(:user_3) { users.create!(name: 'confirmed-user-3', email: 'confirmed-3@example.com', confirmed_at: 1.day.ago, projects_limit: 100) }
-  let!(:user_4) { users.create!(name: 'unconfirmed-user', email: 'unconfirmed@example.com', confirmed_at: nil, projects_limit: 100) }
-
-  let!(:email_1) { emails.create!(email: 'confirmed-1@example.com', user_id: user_1.id, confirmed_at: 1.day.ago) }
-  let!(:email_2) { emails.create!(email: 'other_2@example.com', user_id: user_2.id, confirmed_at: 1.day.ago) }
-
-  before do
-    stub_const("#{described_class.name}::BATCH_SIZE", 2)
-  end
-
-  it 'adds the primary email to emails for leftover confirmed users that do not have their primary email in the emails table', :aggregate_failures do
-    original_email_1_confirmed_at = email_1.reload.confirmed_at
-
-    expect { migration.up }.to change { emails.count }.by(2)
-
-    expect(emails.find_by(user_id: user_2.id, email: 'confirmed-2@example.com').confirmed_at).to eq(user_2.reload.confirmed_at)
-    expect(emails.find_by(user_id: user_3.id, email: 'confirmed-3@example.com').confirmed_at).to eq(user_3.reload.confirmed_at)
-    expect(email_1.reload.confirmed_at).to eq(original_email_1_confirmed_at)
-
-    expect(emails.exists?(user_id: user_4.id)).to be(false)
-  end
-
-  it 'continues in case of errors with one email' do
-    allow(Email).to receive(:create) { raise 'boom!' }
-
-    expect { migration.up }.not_to raise_error
-  end
-end
diff --git a/spec/migrations/cleanup_after_fixing_regression_with_new_users_emails_spec.rb b/spec/migrations/cleanup_after_fixing_regression_with_new_users_emails_spec.rb
deleted file mode 100644
index ce7be6aed730338cb9b2e13c460e2b811e751f02..0000000000000000000000000000000000000000
--- a/spec/migrations/cleanup_after_fixing_regression_with_new_users_emails_spec.rb
+++ /dev/null
@@ -1,42 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe CleanupAfterFixingRegressionWithNewUsersEmails, :sidekiq, feature_category: :user_profile do
-  let(:migration) { described_class.new }
-  let(:users) { table(:users) }
-  let(:emails) { table(:emails) }
-
-  # rubocop: disable Layout/LineLength
-  let!(:user_1) { users.create!(name: 'confirmed-user-1', email: 'confirmed-1@example.com', confirmed_at: 3.days.ago, projects_limit: 100) }
-  let!(:user_2) { users.create!(name: 'confirmed-user-2', email: 'confirmed-2@example.com', confirmed_at: 1.day.ago, projects_limit: 100) }
-  let!(:user_3) { users.create!(name: 'confirmed-user-3', email: 'confirmed-3@example.com', confirmed_at: 1.day.ago, projects_limit: 100) }
-  let!(:user_4) { users.create!(name: 'unconfirmed-user', email: 'unconfirmed@example.com', confirmed_at: nil, projects_limit: 100) }
-
-  let!(:email_1) { emails.create!(email: 'confirmed-1@example.com', user_id: user_1.id, confirmed_at: 1.day.ago) }
-  let!(:email_2) { emails.create!(email: 'other_2@example.com', user_id: user_2.id, confirmed_at: 1.day.ago) }
-
-  before do
-    stub_const("#{described_class.name}::BATCH_SIZE", 2)
-  end
-
-  it 'adds primary email to emails for confirmed users that do not have their primary email in emails table', :aggregate_failures do
-    original_email_1_confirmed_at = email_1.reload.confirmed_at
-
-    expect { migration.up }.to change { emails.count }.by(2)
-
-    expect(emails.find_by(user_id: user_2.id, email: 'confirmed-2@example.com').confirmed_at).to eq(user_2.reload.confirmed_at)
-    expect(emails.find_by(user_id: user_3.id, email: 'confirmed-3@example.com').confirmed_at).to eq(user_3.reload.confirmed_at)
-    expect(email_1.reload.confirmed_at).to eq(original_email_1_confirmed_at)
-
-    expect(emails.exists?(user_id: user_4.id)).to be(false)
-  end
-  # rubocop: enable Layout/LineLength
-
-  it 'continues in case of errors with one email' do
-    allow(Email).to receive(:create) { raise 'boom!' }
-
-    expect { migration.up }.not_to raise_error
-  end
-end
diff --git a/spec/migrations/cleanup_backfill_integrations_enable_ssl_verification_spec.rb b/spec/migrations/cleanup_backfill_integrations_enable_ssl_verification_spec.rb
deleted file mode 100644
index 01c85f85e0b15e17aed91071b4616087b8498442..0000000000000000000000000000000000000000
--- a/spec/migrations/cleanup_backfill_integrations_enable_ssl_verification_spec.rb
+++ /dev/null
@@ -1,36 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe CleanupBackfillIntegrationsEnableSslVerification, :migration,
-  feature_category: :system_access do
-  let(:job_class_name) { 'BackfillIntegrationsEnableSslVerification' }
-
-  before do
-    # Jobs enqueued in Sidekiq.
-    Sidekiq::Testing.disable! do
-      BackgroundMigrationWorker.perform_in(10, job_class_name, [1, 2])
-      BackgroundMigrationWorker.perform_in(20, job_class_name, [3, 4])
-    end
-
-    # Jobs tracked in the database.
-    Gitlab::Database::BackgroundMigrationJob.create!(
-      class_name: job_class_name,
-      arguments: [5, 6],
-      status: Gitlab::Database::BackgroundMigrationJob.statuses['pending']
-    )
-    Gitlab::Database::BackgroundMigrationJob.create!(
-      class_name: job_class_name,
-      arguments: [7, 8],
-      status: Gitlab::Database::BackgroundMigrationJob.statuses['succeeded']
-    )
-
-    migrate!
-  end
-
-  it_behaves_like(
-    'finalized tracked background migration',
-    Gitlab::BackgroundMigration::BackfillIntegrationsEnableSslVerification
-  )
-end
diff --git a/spec/migrations/cleanup_mr_attention_request_todos_spec.rb b/spec/migrations/cleanup_mr_attention_request_todos_spec.rb
deleted file mode 100644
index cea72003ccd7d0977f44ee6ea14571291d9b4d98..0000000000000000000000000000000000000000
--- a/spec/migrations/cleanup_mr_attention_request_todos_spec.rb
+++ /dev/null
@@ -1,46 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe CleanupMrAttentionRequestTodos, :migration, feature_category: :code_review_workflow do
-  let(:projects) { table(:projects) }
-  let(:namespaces) { table(:namespaces) }
-  let(:users) { table(:users) }
-  let(:todos) { table(:todos) }
-
-  let(:author) { users.create!(projects_limit: 1) }
-  let(:namespace) { namespaces.create!(name: 'test', path: 'test') }
-  let(:project) do
-    projects.create!(
-      namespace_id: namespace.id,
-      project_namespace_id: namespace.id,
-      name: 'test-project'
-    )
-  end
-
-  let(:attention_requested) { 10 }
-  let(:todo_attrs) do
-    {
-      project_id: project.id,
-      author_id: author.id,
-      user_id: author.id,
-      target_type: 'TestType',
-      state: 'pending'
-    }
-  end
-
-  let!(:todo1) { todos.create!(todo_attrs.merge(action: Todo::ASSIGNED)) }
-  let!(:todo2) { todos.create!(todo_attrs.merge(action: Todo::MENTIONED)) }
-  let!(:todo3) { todos.create!(todo_attrs.merge(action: Todo::REVIEW_REQUESTED)) }
-  let!(:todo4) { todos.create!(todo_attrs.merge(action: attention_requested)) }
-  let!(:todo5) { todos.create!(todo_attrs.merge(action: attention_requested)) }
-
-  describe '#up' do
-    it 'clean up attention request todos' do
-      expect { migrate! }.to change(todos, :count).by(-2)
-
-      expect(todos.all).to include(todo1, todo2, todo3)
-    end
-  end
-end
diff --git a/spec/migrations/cleanup_orphaned_routes_spec.rb b/spec/migrations/cleanup_orphaned_routes_spec.rb
deleted file mode 100644
index 439ba5def99fde549af0305b205ece54ce219cc2..0000000000000000000000000000000000000000
--- a/spec/migrations/cleanup_orphaned_routes_spec.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe CleanupOrphanedRoutes, :migration, feature_category: :groups_and_projects do
-  let(:migration) { described_class::MIGRATION }
-
-  describe '#up' do
-    it 'schedules background jobs' do
-      migrate!
-
-      expect(migration).to have_scheduled_batched_migration(
-        table_name: :routes,
-        column_name: :id,
-        interval: described_class::DELAY_INTERVAL,
-        gitlab_schema: :gitlab_main
-      )
-    end
-  end
-
-  describe '#down' do
-    it 'deletes all batched migration records' do
-      migrate!
-      schema_migrate_down!
-
-      expect(migration).not_to have_scheduled_batched_migration
-    end
-  end
-end
diff --git a/spec/migrations/finalize_orphaned_routes_cleanup_spec.rb b/spec/migrations/finalize_orphaned_routes_cleanup_spec.rb
deleted file mode 100644
index 2b26ef2a762785ea9faadf83a032c8fb77e235ae..0000000000000000000000000000000000000000
--- a/spec/migrations/finalize_orphaned_routes_cleanup_spec.rb
+++ /dev/null
@@ -1,76 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe FinalizeOrphanedRoutesCleanup, :migration, feature_category: :groups_and_projects do
-  let(:batched_migrations) { table(:batched_background_migrations) }
-
-  let!(:migration) { described_class::MIGRATION }
-
-  describe '#up' do
-    shared_examples 'finalizes the migration' do
-      it 'finalizes the migration' do
-        allow_next_instance_of(Gitlab::Database::BackgroundMigration::BatchedMigrationRunner) do |runner|
-          expect(runner).to receive(:finalize).with(migration, :projects, :id, [])
-        end
-      end
-    end
-
-    context 'when migration is missing' do
-      before do
-        batched_migrations.where(job_class_name: migration).delete_all
-      end
-
-      it 'warns migration not found' do
-        expect(Gitlab::AppLogger)
-          .to receive(:warn).with(/Could not find batched background migration for the given configuration:/)
-
-        migrate!
-      end
-    end
-
-    context 'with migration present' do
-      let!(:project_namespace_backfill) do
-        batched_migrations.create!(
-          job_class_name: migration,
-          table_name: :routes,
-          column_name: :id,
-          job_arguments: [],
-          interval: 2.minutes,
-          min_value: 1,
-          max_value: 2,
-          batch_size: 1000,
-          sub_batch_size: 200,
-          gitlab_schema: :gitlab_main,
-          status: 3 # finished
-        )
-      end
-
-      context 'when migration finished successfully' do
-        it 'does not raise exception' do
-          expect { migrate! }.not_to raise_error
-        end
-      end
-
-      context 'with different migration statuses' do
-        using RSpec::Parameterized::TableSyntax
-
-        where(:status, :description) do
-          0 | 'paused'
-          1 | 'active'
-          4 | 'failed'
-          5 | 'finalizing'
-        end
-
-        with_them do
-          before do
-            project_namespace_backfill.update!(status: status)
-          end
-
-          it_behaves_like 'finalizes the migration'
-        end
-      end
-    end
-  end
-end
diff --git a/spec/migrations/finalize_project_namespaces_backfill_spec.rb b/spec/migrations/finalize_project_namespaces_backfill_spec.rb
deleted file mode 100644
index a63f05bed8d07f971a2a5745f76b071e0a007e37..0000000000000000000000000000000000000000
--- a/spec/migrations/finalize_project_namespaces_backfill_spec.rb
+++ /dev/null
@@ -1,75 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe FinalizeProjectNamespacesBackfill, :migration, feature_category: :groups_and_projects do
-  let(:batched_migrations) { table(:batched_background_migrations) }
-
-  let!(:migration) { described_class::MIGRATION }
-
-  describe '#up' do
-    shared_examples 'finalizes the migration' do
-      it 'finalizes the migration' do
-        allow_next_instance_of(Gitlab::Database::BackgroundMigration::BatchedMigrationRunner) do |runner|
-          expect(runner).to receive(:finalize).with(migration, :projects, :id, [nil, "up"])
-        end
-      end
-    end
-
-    context 'when project namespace backfilling migration is missing' do
-      before do
-        batched_migrations.where(job_class_name: migration).delete_all
-      end
-
-      it 'warns migration not found' do
-        expect(Gitlab::AppLogger)
-          .to receive(:warn).with(/Could not find batched background migration for the given configuration:/)
-
-        migrate!
-      end
-    end
-
-    context 'with backfilling migration present' do
-      let!(:project_namespace_backfill) do
-        batched_migrations.create!(
-          job_class_name: migration,
-          table_name: :projects,
-          column_name: :id,
-          job_arguments: [nil, 'up'],
-          interval: 2.minutes,
-          min_value: 1,
-          max_value: 2,
-          batch_size: 1000,
-          sub_batch_size: 200,
-          status: 3 # finished
-        )
-      end
-
-      context 'when project namespace backfilling migration finished successfully' do
-        it 'does not raise exception' do
-          expect { migrate! }.not_to raise_error
-        end
-      end
-
-      context 'when project namespace backfilling migration is paused' do
-        using RSpec::Parameterized::TableSyntax
-
-        where(:status, :description) do
-          0 | 'paused'
-          1 | 'active'
-          4 | 'failed'
-          5 | 'finalizing'
-        end
-
-        with_them do
-          before do
-            project_namespace_backfill.update!(status: status)
-          end
-
-          it_behaves_like 'finalizes the migration'
-        end
-      end
-    end
-  end
-end
diff --git a/spec/migrations/finalize_routes_backfilling_for_projects_spec.rb b/spec/migrations/finalize_routes_backfilling_for_projects_spec.rb
deleted file mode 100644
index c9972d274ee63c2cfec6fa76b573f6f73d9cc8ec..0000000000000000000000000000000000000000
--- a/spec/migrations/finalize_routes_backfilling_for_projects_spec.rb
+++ /dev/null
@@ -1,76 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe FinalizeRoutesBackfillingForProjects, :migration, feature_category: :groups_and_projects do
-  let(:batched_migrations) { table(:batched_background_migrations) }
-
-  let!(:migration) { described_class::MIGRATION }
-
-  describe '#up' do
-    shared_examples 'finalizes the migration' do
-      it 'finalizes the migration' do
-        allow_next_instance_of(Gitlab::Database::BackgroundMigration::BatchedMigrationRunner) do |runner|
-          expect(runner).to receive(:finalize).with(migration, :projects, :id, [])
-        end
-      end
-    end
-
-    context 'when routes backfilling migration is missing' do
-      before do
-        batched_migrations.where(job_class_name: migration).delete_all
-      end
-
-      it 'warns migration not found' do
-        expect(Gitlab::AppLogger)
-          .to receive(:warn).with(/Could not find batched background migration for the given configuration:/)
-
-        migrate!
-      end
-    end
-
-    context 'with backfilling migration present' do
-      let!(:project_namespace_backfill) do
-        batched_migrations.create!(
-          job_class_name: migration,
-          table_name: :routes,
-          column_name: :id,
-          job_arguments: [],
-          interval: 2.minutes,
-          min_value: 1,
-          max_value: 2,
-          batch_size: 1000,
-          sub_batch_size: 200,
-          gitlab_schema: :gitlab_main,
-          status: 3 # finished
-        )
-      end
-
-      context 'when backfilling migration finished successfully' do
-        it 'does not raise exception' do
-          expect { migrate! }.not_to raise_error
-        end
-      end
-
-      context 'with different backfilling migration statuses' do
-        using RSpec::Parameterized::TableSyntax
-
-        where(:status, :description) do
-          0 | 'paused'
-          1 | 'active'
-          4 | 'failed'
-          5 | 'finalizing'
-        end
-
-        with_them do
-          before do
-            project_namespace_backfill.update!(status: status)
-          end
-
-          it_behaves_like 'finalizes the migration'
-        end
-      end
-    end
-  end
-end
diff --git a/spec/migrations/fix_and_backfill_project_namespaces_for_projects_with_duplicate_name_spec.rb b/spec/migrations/fix_and_backfill_project_namespaces_for_projects_with_duplicate_name_spec.rb
deleted file mode 100644
index fdeba216c4f36e08270b41acb7a8415faf850b9f..0000000000000000000000000000000000000000
--- a/spec/migrations/fix_and_backfill_project_namespaces_for_projects_with_duplicate_name_spec.rb
+++ /dev/null
@@ -1,51 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe FixAndBackfillProjectNamespacesForProjectsWithDuplicateName, :migration, feature_category: :groups_and_projects do
-  let(:projects) { table(:projects) }
-  let(:namespaces) { table(:namespaces) }
-
-  let!(:group) { namespaces.create!(name: 'group1', path: 'group1', type: 'Group') }
-  let!(:project_namespace) { namespaces.create!(name: 'project2', path: 'project2', type: 'Project') }
-  let!(:project1) { projects.create!(name: 'project1', path: 'project1', project_namespace_id: nil, namespace_id: group.id, visibility_level: 20) }
-  let!(:project2) { projects.create!(name: 'project2', path: 'project2', project_namespace_id: project_namespace.id, namespace_id: group.id, visibility_level: 20) }
-  let!(:project3) { projects.create!(name: 'project3', path: 'project3', project_namespace_id: nil, namespace_id: group.id, visibility_level: 20) }
-  let!(:project4) { projects.create!(name: 'project4', path: 'project4', project_namespace_id: nil, namespace_id: group.id, visibility_level: 20) }
-
-  describe '#up' do
-    it 'schedules background migrations' do
-      Sidekiq::Testing.fake! do
-        freeze_time do
-          described_class.new.up
-
-          migration = described_class::MIGRATION
-
-          expect(migration).to be_scheduled_delayed_migration(2.minutes, project1.id, project4.id)
-          expect(BackgroundMigrationWorker.jobs.size).to eq 1
-        end
-      end
-    end
-
-    context 'in batches' do
-      before do
-        stub_const('FixAndBackfillProjectNamespacesForProjectsWithDuplicateName::BATCH_SIZE', 2)
-      end
-
-      it 'schedules background migrations' do
-        Sidekiq::Testing.fake! do
-          freeze_time do
-            described_class.new.up
-
-            migration = described_class::MIGRATION
-
-            expect(migration).to be_scheduled_delayed_migration(2.minutes, project1.id, project3.id)
-            expect(migration).to be_scheduled_delayed_migration(4.minutes, project4.id, project4.id)
-            expect(BackgroundMigrationWorker.jobs.size).to eq 2
-          end
-        end
-      end
-    end
-  end
-end
diff --git a/spec/migrations/move_security_findings_table_to_gitlab_partitions_dynamic_schema_spec.rb b/spec/migrations/move_security_findings_table_to_gitlab_partitions_dynamic_schema_spec.rb
deleted file mode 100644
index 2533d3224a6ac445d56bdb149440691698c9a6d8..0000000000000000000000000000000000000000
--- a/spec/migrations/move_security_findings_table_to_gitlab_partitions_dynamic_schema_spec.rb
+++ /dev/null
@@ -1,108 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe MoveSecurityFindingsTableToGitlabPartitionsDynamicSchema, feature_category: :vulnerability_management do
-  let(:partitions_sql) do
-    <<~SQL
-      SELECT
-        partitions.relname AS partition_name
-      FROM pg_inherits
-      JOIN pg_class parent ON pg_inherits.inhparent = parent.oid
-      JOIN pg_class partitions ON pg_inherits.inhrelid = partitions.oid
-      WHERE
-        parent.relname = 'security_findings'
-    SQL
-  end
-
-  describe '#up' do
-    it 'changes the `security_findings` table to be partitioned' do
-      expect { migrate! }.to change { security_findings_partitioned? }.from(false).to(true)
-                         .and change { execute(partitions_sql) }.from([]).to(['security_findings_1'])
-    end
-  end
-
-  describe '#down' do
-    context 'when there is a partition' do
-      let(:users) { table(:users) }
-      let(:namespaces) { table(:namespaces) }
-      let(:projects) { table(:projects) }
-      let(:scanners) { table(:vulnerability_scanners) }
-      let(:security_scans) { table(:security_scans) }
-      let(:security_findings) { table(:security_findings) }
-
-      let(:user) { users.create!(email: 'test@gitlab.com', projects_limit: 5) }
-      let(:namespace) { namespaces.create!(name: 'gtlb', path: 'gitlab', type: Namespaces::UserNamespace.sti_name) }
-      let(:project) { projects.create!(namespace_id: namespace.id, project_namespace_id: namespace.id, name: 'foo') }
-      let(:scanner) { scanners.create!(project_id: project.id, external_id: 'bandit', name: 'Bandit') }
-      let(:security_scan) { security_scans.create!(build_id: 1, scan_type: 1) }
-
-      let(:security_findings_count_sql) { 'SELECT COUNT(*) FROM security_findings' }
-
-      before do
-        migrate!
-
-        security_findings.create!(
-          scan_id: security_scan.id,
-          scanner_id: scanner.id,
-          uuid: SecureRandom.uuid,
-          severity: 0,
-          confidence: 0
-        )
-      end
-
-      it 'creates the original table with the data from the existing partition' do
-        expect { schema_migrate_down! }.to change { security_findings_partitioned? }.from(true).to(false)
-                                       .and not_change { execute(security_findings_count_sql) }.from([1])
-      end
-
-      context 'when there are more than one partitions' do
-        before do
-          migrate!
-
-          execute(<<~SQL)
-            CREATE TABLE gitlab_partitions_dynamic.security_findings_11
-            PARTITION OF security_findings FOR VALUES IN (11)
-          SQL
-        end
-
-        it 'creates the original table from the latest existing partition' do
-          expect { schema_migrate_down! }.to change { security_findings_partitioned? }.from(true).to(false)
-                                         .and change { execute(security_findings_count_sql) }.from([1]).to([0])
-        end
-      end
-    end
-
-    context 'when there is no partition' do
-      before do
-        migrate!
-
-        execute(partitions_sql).each do |partition_name|
-          execute("DROP TABLE gitlab_partitions_dynamic.#{partition_name}")
-        end
-      end
-
-      it 'creates the original table' do
-        expect { schema_migrate_down! }.to change { security_findings_partitioned? }.from(true).to(false)
-      end
-    end
-  end
-
-  def security_findings_partitioned?
-    sql = <<~SQL
-      SELECT
-        COUNT(*)
-      FROM
-        pg_partitioned_table
-      INNER JOIN pg_class ON pg_class.oid = pg_partitioned_table.partrelid
-      WHERE pg_class.relname = 'security_findings'
-    SQL
-
-    execute(sql).first != 0
-  end
-
-  def execute(sql)
-    ActiveRecord::Base.connection.execute(sql).values.flatten
-  end
-end
diff --git a/spec/migrations/orphaned_invited_members_cleanup_spec.rb b/spec/migrations/orphaned_invited_members_cleanup_spec.rb
deleted file mode 100644
index 416e1ddd755f504a305797935b2737f746eb81dc..0000000000000000000000000000000000000000
--- a/spec/migrations/orphaned_invited_members_cleanup_spec.rb
+++ /dev/null
@@ -1,46 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe OrphanedInvitedMembersCleanup, :migration, feature_category: :groups_and_projects do
-  describe '#up', :aggregate_failures do
-    it 'removes accepted members with no associated user' do
-      user = create_user!('testuser1')
-
-      create_member(invite_token: nil, invite_accepted_at: 1.day.ago)
-      record2 = create_member(invite_token: nil, invite_accepted_at: 1.day.ago, user_id: user.id)
-      record3 = create_member(invite_token: 'foo2', invite_accepted_at: nil)
-      record4 = create_member(invite_token: 'foo3', invite_accepted_at: 1.day.ago)
-
-      migrate!
-
-      expect(table(:members).all.pluck(:id)).to match_array([record2.id, record3.id, record4.id])
-    end
-  end
-
-  private
-
-  def create_user!(name)
-    email = "#{name}@example.com"
-
-    table(:users).create!(
-      name: name,
-      email: email,
-      username: name,
-      projects_limit: 0
-    )
-  end
-
-  def create_member(**extra_attributes)
-    defaults = {
-      access_level: 10,
-      source_id: 1,
-      source_type: "Project",
-      notification_level: 0,
-      type: 'ProjectMember'
-    }
-
-    table(:members).create!(defaults.merge(extra_attributes))
-  end
-end
diff --git a/spec/migrations/populate_audit_event_streaming_verification_token_spec.rb b/spec/migrations/populate_audit_event_streaming_verification_token_spec.rb
deleted file mode 100644
index e2c117903d45330f5335ab228cf538b080bc5bbc..0000000000000000000000000000000000000000
--- a/spec/migrations/populate_audit_event_streaming_verification_token_spec.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe PopulateAuditEventStreamingVerificationToken, feature_category: :audit_events do
-  let(:groups) { table(:namespaces) }
-  let(:destinations) { table(:audit_events_external_audit_event_destinations) }
-  let(:migration) { described_class.new }
-
-  let!(:group) { groups.create!(name: 'test-group', path: 'test-group') }
-  let!(:destination) { destinations.create!(namespace_id: group.id, destination_url: 'https://example.com/destination', verification_token: nil) }
-
-  describe '#up' do
-    it 'adds verification tokens to records created before the migration' do
-      expect do
-        migrate!
-        destination.reload
-      end.to change { destination.verification_token }.from(nil).to(a_string_matching(/\w{24}/))
-    end
-  end
-end
diff --git a/spec/migrations/populate_operation_visibility_permissions_spec.rb b/spec/migrations/populate_operation_visibility_permissions_spec.rb
deleted file mode 100644
index 704152bd6a93114a3c85c3993f008c010ab65b67..0000000000000000000000000000000000000000
--- a/spec/migrations/populate_operation_visibility_permissions_spec.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe PopulateOperationVisibilityPermissions, :migration, feature_category: :navigation do
-  let(:migration) { described_class::MIGRATION }
-
-  before do
-    stub_const("#{described_class.name}::SUB_BATCH_SIZE", 2)
-  end
-
-  it 'schedules background migrations', :aggregate_failures do
-    migrate!
-
-    expect(migration).to have_scheduled_batched_migration(
-      table_name: :project_features,
-      column_name: :id,
-      interval: described_class::INTERVAL
-    )
-  end
-
-  describe '#down' do
-    it 'deletes all batched migration records' do
-      migrate!
-      schema_migrate_down!
-
-      expect(migration).not_to have_scheduled_batched_migration
-    end
-  end
-end
diff --git a/spec/migrations/populate_releases_access_level_from_repository_spec.rb b/spec/migrations/populate_releases_access_level_from_repository_spec.rb
deleted file mode 100644
index ebb7aa6f7fabb737dc17b2f59cd3a475921cdb58..0000000000000000000000000000000000000000
--- a/spec/migrations/populate_releases_access_level_from_repository_spec.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe PopulateReleasesAccessLevelFromRepository, :migration, feature_category: :navigation do
-  let(:projects) { table(:projects) }
-  let(:groups) { table(:namespaces) }
-  let(:project_features) { table(:project_features) }
-
-  let(:group) { groups.create!(name: 'test-group', path: 'test-group') }
-  let(:project) { projects.create!(namespace_id: group.id, project_namespace_id: group.id) }
-  let(:project_feature) do
-    project_features.create!(project_id: project.id, pages_access_level: 20, **project_feature_attributes)
-  end
-
-  # repository_access_level and releases_access_level default to ENABLED
-  describe '#up' do
-    context 'when releases_access_level is greater than repository_access_level' do
-      let(:project_feature_attributes) { { repository_access_level: ProjectFeature::PRIVATE } }
-
-      it 'reduces releases_access_level to match repository_access_level' do
-        expect { migrate! }.to change { project_feature.reload.releases_access_level }
-                           .from(ProjectFeature::ENABLED)
-                           .to(ProjectFeature::PRIVATE)
-      end
-    end
-
-    context 'when releases_access_level is less than repository_access_level' do
-      let(:project_feature_attributes) { { releases_access_level: ProjectFeature::DISABLED } }
-
-      it 'does not change releases_access_level' do
-        expect { migrate! }.not_to change { project_feature.reload.releases_access_level }
-                           .from(ProjectFeature::DISABLED)
-      end
-    end
-  end
-end
diff --git a/spec/migrations/queue_backfill_project_feature_package_registry_access_level_spec.rb b/spec/migrations/queue_backfill_project_feature_package_registry_access_level_spec.rb
deleted file mode 100644
index 6a01b30445bb03749a1545fe154bfc7470f2d347..0000000000000000000000000000000000000000
--- a/spec/migrations/queue_backfill_project_feature_package_registry_access_level_spec.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe QueueBackfillProjectFeaturePackageRegistryAccessLevel, feature_category: :package_registry do
-  let!(:batched_migration) { described_class::MIGRATION }
-
-  it 'schedules a new batched migration' do
-    reversible_migration do |migration|
-      migration.before -> {
-        expect(batched_migration).not_to have_scheduled_batched_migration
-      }
-
-      migration.after -> {
-        expect(batched_migration).to have_scheduled_batched_migration(
-          table_name: :projects,
-          column_name: :id,
-          interval: described_class::DELAY_INTERVAL
-        )
-      }
-    end
-  end
-end
diff --git a/spec/migrations/recreate_index_security_ci_builds_on_name_and_id_parser_with_new_features_spec.rb b/spec/migrations/recreate_index_security_ci_builds_on_name_and_id_parser_with_new_features_spec.rb
deleted file mode 100644
index c770976472785ef61d5ccf2fb66dd89bb90b51b7..0000000000000000000000000000000000000000
--- a/spec/migrations/recreate_index_security_ci_builds_on_name_and_id_parser_with_new_features_spec.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe RecreateIndexSecurityCiBuildsOnNameAndIdParserWithNewFeatures, :migration, feature_category: :continuous_integration do
-  let(:db) { described_class.new }
-  let(:pg_class) { table(:pg_class) }
-  let(:pg_index) { table(:pg_index) }
-  let(:async_indexes) { table(:postgres_async_indexes) }
-
-  it 'recreates index' do
-    reversible_migration do |migration|
-      migration.before -> {
-        expect(async_indexes.where(name: described_class::OLD_INDEX_NAME).exists?).to be false
-        expect(db.index_exists?(described_class::TABLE, described_class::COLUMNS, name: described_class::OLD_INDEX_NAME)).to be true
-        expect(db.index_exists?(described_class::TABLE, described_class::COLUMNS, name: described_class::NEW_INDEX_NAME)).to be false
-      }
-
-      migration.after -> {
-        expect(async_indexes.where(name: described_class::OLD_INDEX_NAME).exists?).to be true
-        expect(db.index_exists?(described_class::TABLE, described_class::COLUMNS, name: described_class::OLD_INDEX_NAME)).to be false
-        expect(db.index_exists?(described_class::TABLE, described_class::COLUMNS, name: described_class::NEW_INDEX_NAME)).to be true
-      }
-    end
-  end
-end
diff --git a/spec/migrations/remove_invalid_integrations_spec.rb b/spec/migrations/remove_invalid_integrations_spec.rb
deleted file mode 100644
index 52adc087e0a5f199b2654276b697e0151429bc6a..0000000000000000000000000000000000000000
--- a/spec/migrations/remove_invalid_integrations_spec.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe RemoveInvalidIntegrations, :migration, feature_category: :integrations do
-  describe '#up' do
-    let!(:integrations) { table(:integrations) }
-
-    let!(:valid_integration) { integrations.create!(type_new: 'Foo') }
-    let!(:invalid_integration) { integrations.create! }
-
-    it 'removes invalid integrations', :aggregate_failures do
-      expect { migrate! }
-        .to change { integrations.pluck(:id) }.to(contain_exactly(valid_integration.id))
-    end
-
-    context 'when there are many invalid integrations' do
-      before do
-        stub_const('RemoveInvalidIntegrations::BATCH_SIZE', 3)
-        5.times { integrations.create! }
-      end
-
-      it 'removes them all' do
-        migrate!
-
-        expect(integrations.pluck(:type_new)).to all(be_present)
-      end
-    end
-  end
-end
diff --git a/spec/migrations/remove_not_null_contraint_on_title_from_sprints_spec.rb b/spec/migrations/remove_not_null_contraint_on_title_from_sprints_spec.rb
deleted file mode 100644
index 91687d8d73066d5e2115ec957cbd09a6579dc0a3..0000000000000000000000000000000000000000
--- a/spec/migrations/remove_not_null_contraint_on_title_from_sprints_spec.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe RemoveNotNullContraintOnTitleFromSprints, :migration, feature_category: :team_planning do
-  let(:migration) { described_class.new }
-  let(:namespaces) { table(:namespaces) }
-  let(:sprints) { table(:sprints) }
-  let(:iterations_cadences) { table(:iterations_cadences) }
-
-  let!(:group) { namespaces.create!(name: 'foo', path: 'foo') }
-  let!(:cadence) { iterations_cadences.create!(group_id: group.id, title: "cadence 1") }
-  let!(:iteration1) { sprints.create!(id: 1, title: 'a', group_id: group.id, iterations_cadence_id: cadence.id, start_date: Date.new(2021, 11, 1), due_date: Date.new(2021, 11, 5), iid: 1) }
-
-  describe '#down' do
-    it "removes null titles by setting them with ids" do
-      migration.up
-
-      iteration2 = sprints.create!(id: 2, title: nil, group_id: group.id, iterations_cadence_id: cadence.id, start_date: Date.new(2021, 12, 1), due_date: Date.new(2021, 12, 5), iid: 2)
-
-      migration.down
-
-      expect(iteration1.reload.title).to eq 'a'
-      expect(iteration2.reload.title).to eq '2'
-    end
-  end
-end
diff --git a/spec/migrations/remove_wiki_notes_spec.rb b/spec/migrations/remove_wiki_notes_spec.rb
deleted file mode 100644
index 55f58ef7be6208a8426457cbfda1943a67bd0ded..0000000000000000000000000000000000000000
--- a/spec/migrations/remove_wiki_notes_spec.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe RemoveWikiNotes, :migration, feature_category: :team_planning do
-  let(:notes) { table(:notes) }
-
-  it 'removes all wiki notes' do
-    notes.create!(id: 97, note: 'Wiki note', noteable_type: 'Wiki')
-    notes.create!(id: 98, note: 'Commit note', noteable_type: 'Commit')
-    notes.create!(id: 110, note: 'Issue note', noteable_type: 'Issue')
-    notes.create!(id: 242, note: 'MergeRequest note', noteable_type: 'MergeRequest')
-
-    expect(notes.where(noteable_type: 'Wiki').size).to eq(1)
-
-    expect { migrate! }.to change { notes.count }.by(-1)
-
-    expect(notes.where(noteable_type: 'Wiki').size).to eq(0)
-  end
-
-  context 'when not staging nor com' do
-    it 'does not remove notes' do
-      allow(::Gitlab).to receive(:com?).and_return(false)
-      allow(::Gitlab).to receive(:dev_or_test_env?).and_return(false)
-      allow(::Gitlab).to receive(:staging?).and_return(false)
-
-      notes.create!(id: 97, note: 'Wiki note', noteable_type: 'Wiki')
-
-      expect { migrate! }.not_to change { notes.count }
-    end
-  end
-end
diff --git a/spec/migrations/reschedule_backfill_imported_issue_search_data_spec.rb b/spec/migrations/reschedule_backfill_imported_issue_search_data_spec.rb
deleted file mode 100644
index fe730f452f7e386d9b31d343c82f1d592808e157..0000000000000000000000000000000000000000
--- a/spec/migrations/reschedule_backfill_imported_issue_search_data_spec.rb
+++ /dev/null
@@ -1,101 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe RescheduleBackfillImportedIssueSearchData, feature_category: :global_search do
-  let!(:reschedule_migration) { described_class::MIGRATION }
-
-  def create_batched_migration(max_value:)
-    Gitlab::Database::BackgroundMigration::BatchedMigration
-      .create!(
-        max_value: max_value,
-        batch_size: 200,
-        sub_batch_size: 20,
-        interval: 120,
-        job_class_name: 'BackfillIssueSearchData',
-        table_name: 'issues',
-        column_name: 'id',
-        gitlab_schema: 'glschema'
-      )
-  end
-
-  shared_examples 'backfill rescheduler' do
-    it 'schedules a new batched migration' do
-      reversible_migration do |migration|
-        migration.before -> {
-          expect(reschedule_migration).not_to have_scheduled_batched_migration
-        }
-        migration.after -> {
-          expect(reschedule_migration).to have_scheduled_batched_migration(
-            table_name: :issues,
-            column_name: :id,
-            interval: described_class::DELAY_INTERVAL,
-            batch_min_value: batch_min_value
-          )
-        }
-      end
-    end
-  end
-
-  context 'when BackfillIssueSearchData.max_value is nil' do
-    let(:batch_min_value) { described_class::BATCH_MIN_VALUE }
-
-    it_behaves_like 'backfill rescheduler'
-  end
-
-  context 'when BackfillIssueSearchData.max_value exists' do
-    let(:batch_min_value) { described_class::BATCH_MIN_VALUE }
-
-    before do
-      create_batched_migration(max_value: 200)
-    end
-
-    it_behaves_like 'backfill rescheduler'
-  end
-
-  context 'when an issue is available' do
-    let!(:namespaces_table) { table(:namespaces) }
-    let!(:projects_table) { table(:projects) }
-
-    let(:namespace) { namespaces_table.create!(name: 'gitlab-org', path: 'gitlab-org') }
-
-    let(:project) do
-      projects_table.create!(
-        name: 'gitlab', path: 'gitlab-org/gitlab-ce', namespace_id: namespace.id, project_namespace_id: namespace.id
-      )
-    end
-
-    let(:issue) do
-      table(:issues).create!(
-        project_id: project.id, namespace_id: project.project_namespace_id,
-        title: 'test title', description: 'test description'
-      )
-    end
-
-    before do
-      create_batched_migration(max_value: max_value)
-    end
-
-    context 'when BackfillIssueSearchData.max_value = Issue.maximum(:id)' do
-      let(:max_value) { issue.id }
-      let(:batch_min_value) { max_value }
-
-      it_behaves_like 'backfill rescheduler'
-    end
-
-    context 'when BackfillIssueSearchData.max_value > Issue.maximum(:id)' do
-      let(:max_value) { issue.id + 1 }
-      let(:batch_min_value) { issue.id }
-
-      it_behaves_like 'backfill rescheduler'
-    end
-
-    context 'when BackfillIssueSearchData.max_value < Issue.maximum(:id)' do
-      let(:max_value) { issue.id - 1 }
-      let(:batch_min_value) { max_value }
-
-      it_behaves_like 'backfill rescheduler'
-    end
-  end
-end
diff --git a/spec/migrations/reschedule_issue_work_item_type_id_backfill_spec.rb b/spec/migrations/reschedule_issue_work_item_type_id_backfill_spec.rb
deleted file mode 100644
index 1443ff092418c320e7368773006d6e90b33ec5dd..0000000000000000000000000000000000000000
--- a/spec/migrations/reschedule_issue_work_item_type_id_backfill_spec.rb
+++ /dev/null
@@ -1,54 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe RescheduleIssueWorkItemTypeIdBackfill, :migration, feature_category: :team_planning do
-  let!(:migration) { described_class::MIGRATION }
-  let!(:interval) { 2.minutes }
-  let!(:issue_type_enum) { { issue: 0, incident: 1, test_case: 2, requirement: 3, task: 4 } }
-  let!(:base_work_item_type_ids) do
-    table(:work_item_types).where(namespace_id: nil).order(:base_type).each_with_object({}) do |type, hash|
-      hash[type.base_type] = type.id
-    end
-  end
-
-  describe '#up' do
-    it 'correctly schedules background migrations' do
-      Sidekiq::Testing.fake! do
-        freeze_time do
-          migrate!
-
-          scheduled_migrations = Gitlab::Database::BackgroundMigration::BatchedMigration.where(
-            job_class_name: migration
-          )
-          work_item_types = table(:work_item_types).where(namespace_id: nil)
-
-          expect(scheduled_migrations.count).to eq(work_item_types.count)
-
-          [:issue, :incident, :test_case, :requirement, :task].each do |issue_type|
-            expect(migration).to have_scheduled_batched_migration(
-              table_name: :issues,
-              column_name: :id,
-              job_arguments: [issue_type_enum[issue_type], base_work_item_type_ids[issue_type_enum[issue_type]]],
-              interval: interval,
-              batch_size: described_class::BATCH_SIZE,
-              max_batch_size: described_class::MAX_BATCH_SIZE,
-              sub_batch_size: described_class::SUB_BATCH_SIZE,
-              batch_class_name: described_class::BATCH_CLASS_NAME
-            )
-          end
-        end
-      end
-    end
-  end
-
-  describe '#down' do
-    it 'deletes all batched migration records' do
-      migrate!
-      schema_migrate_down!
-
-      expect(migration).not_to have_scheduled_batched_migration
-    end
-  end
-end
diff --git a/spec/migrations/schedule_backfill_cluster_agents_has_vulnerabilities_spec.rb b/spec/migrations/schedule_backfill_cluster_agents_has_vulnerabilities_spec.rb
deleted file mode 100644
index 84764c89adbd08061338ed3c45ae77877d1db216..0000000000000000000000000000000000000000
--- a/spec/migrations/schedule_backfill_cluster_agents_has_vulnerabilities_spec.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe ScheduleBackfillClusterAgentsHasVulnerabilities, feature_category: :vulnerability_management do
-  let!(:batched_migration) { described_class::MIGRATION }
-
-  it 'schedules background jobs for each batch of cluster agents' do
-    reversible_migration do |migration|
-      migration.before -> {
-        expect(batched_migration).not_to have_scheduled_batched_migration
-      }
-
-      migration.after -> {
-        expect(batched_migration).to have_scheduled_batched_migration(
-          table_name: :cluster_agents,
-          column_name: :id,
-          interval: described_class::DELAY_INTERVAL
-        )
-      }
-    end
-  end
-end
diff --git a/spec/migrations/schedule_backfill_draft_status_on_merge_requests_corrected_regex_spec.rb b/spec/migrations/schedule_backfill_draft_status_on_merge_requests_corrected_regex_spec.rb
deleted file mode 100644
index abcdde7f075f5389f08c802a3ce483bf08603935..0000000000000000000000000000000000000000
--- a/spec/migrations/schedule_backfill_draft_status_on_merge_requests_corrected_regex_spec.rb
+++ /dev/null
@@ -1,69 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe ScheduleBackfillDraftStatusOnMergeRequestsCorrectedRegex,
-  :sidekiq, feature_category: :code_review_workflow do
-  let(:namespaces)     { table(:namespaces) }
-  let(:projects)       { table(:projects) }
-  let(:merge_requests) { table(:merge_requests) }
-
-  let!(:namespace) { namespaces.create!(name: 'namespace', path: 'namespace') }
-  let(:proj_namespace) { namespaces.create!(name: 'proj1', path: 'proj1', type: 'Project', parent_id: namespace.id) }
-  let!(:project) { projects.create!(namespace_id: namespace.id, project_namespace_id: proj_namespace.id) }
-
-  let(:draft_prefixes) { ["[Draft]", "(Draft)", "Draft:", "Draft", "[WIP]", "WIP:", "WIP"] }
-
-  def create_merge_request(params)
-    common_params = {
-      target_project_id: project.id,
-      target_branch: 'feature1',
-      source_branch: 'master'
-    }
-
-    merge_requests.create!(common_params.merge(params))
-  end
-
-  before do
-    draft_prefixes.each do |prefix|
-      (1..4).each do |n|
-        create_merge_request(
-          title: "#{prefix} This is a title",
-          draft: false,
-          state_id: n
-        )
-
-        create_merge_request(
-          title: "This is a title with the #{prefix} in a weird spot",
-          draft: false,
-          state_id: n
-        )
-      end
-    end
-
-    stub_const("#{described_class}::BATCH_SIZE", 1)
-  end
-
-  it 'schedules BackfillDraftStatusOnMergeRequests background jobs' do
-    Sidekiq::Testing.fake! do
-      draft_mrs = MergeRequest.where(state_id: 1)
-        .where(draft: false)
-        .where("title ~* ?", described_class::CORRECTED_REGEXP_STR)
-
-      first_mr_id = draft_mrs.first.id
-      second_mr_id = draft_mrs.second.id
-
-      freeze_time do
-        migrate!
-
-        expect(BackgroundMigrationWorker.jobs.size).to eq(7)
-        expect(described_class::MIGRATION)
-          .to be_scheduled_delayed_migration(2.minutes, first_mr_id, first_mr_id)
-        expect(described_class::MIGRATION)
-          .to be_scheduled_delayed_migration(4.minutes, second_mr_id, second_mr_id)
-      end
-    end
-  end
-end
diff --git a/spec/migrations/schedule_backfilling_the_namespace_id_for_vulnerability_reads_spec.rb b/spec/migrations/schedule_backfilling_the_namespace_id_for_vulnerability_reads_spec.rb
deleted file mode 100644
index e547b321c52cd904122da9c456dcb63fa7abd02d..0000000000000000000000000000000000000000
--- a/spec/migrations/schedule_backfilling_the_namespace_id_for_vulnerability_reads_spec.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe ScheduleBackfillingTheNamespaceIdForVulnerabilityReads, feature_category: :vulnerability_management do
-  let!(:migration) { described_class::MIGRATION_NAME }
-
-  describe '#up' do
-    it 'schedules background jobs for each batch of vulnerabilities' do
-      migrate!
-
-      expect(migration).to have_scheduled_batched_migration(
-        table_name: :vulnerability_reads,
-        column_name: :vulnerability_id,
-        interval: 2.minutes,
-        batch_size: 10_000,
-        sub_batch_size: 200
-      )
-    end
-  end
-
-  describe '#down' do
-    it 'deletes all batched migration records' do
-      migrate!
-      schema_migrate_down!
-
-      expect(migration).not_to have_scheduled_batched_migration
-    end
-  end
-end
diff --git a/spec/migrations/schedule_fix_incorrect_max_seats_used2_spec.rb b/spec/migrations/schedule_fix_incorrect_max_seats_used2_spec.rb
deleted file mode 100644
index 26764f855b7e2ea4d9b35f168a541ff56c8e78e5..0000000000000000000000000000000000000000
--- a/spec/migrations/schedule_fix_incorrect_max_seats_used2_spec.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe ScheduleFixIncorrectMaxSeatsUsed2, :migration, feature_category: :purchase do
-  let(:migration_name) { described_class::MIGRATION.to_s.demodulize }
-
-  describe '#up' do
-    it 'schedules a job on Gitlab.com' do
-      allow(Gitlab).to receive(:com?).and_return(true)
-
-      Sidekiq::Testing.fake! do
-        freeze_time do
-          migrate!
-
-          expect(migration_name).to be_scheduled_delayed_migration(1.hour, 'batch_2_for_start_date_before_02_aug_2021')
-          expect(BackgroundMigrationWorker.jobs.size).to eq(1)
-        end
-      end
-    end
-
-    it 'does not schedule any jobs when not Gitlab.com' do
-      allow(Gitlab).to receive(:com?).and_return(false)
-
-      Sidekiq::Testing.fake! do
-        migrate!
-
-        expect(migration_name).not_to be_scheduled_delayed_migration
-        expect(BackgroundMigrationWorker.jobs.size).to eq(0)
-      end
-    end
-  end
-end
diff --git a/spec/migrations/schedule_fix_incorrect_max_seats_used_spec.rb b/spec/migrations/schedule_fix_incorrect_max_seats_used_spec.rb
deleted file mode 100644
index 194a1d39ad13363966f3825c88fd67af4ec62350..0000000000000000000000000000000000000000
--- a/spec/migrations/schedule_fix_incorrect_max_seats_used_spec.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe ScheduleFixIncorrectMaxSeatsUsed, :migration, feature_category: :purchase do
-  let(:migration) { described_class.new }
-
-  describe '#up' do
-    it 'schedules a job on Gitlab.com' do
-      allow(Gitlab).to receive(:com?).and_return(true)
-
-      expect(migration).to receive(:migrate_in).with(1.hour, 'FixIncorrectMaxSeatsUsed')
-
-      migration.up
-    end
-
-    it 'does not schedule any jobs when not Gitlab.com' do
-      allow(Gitlab::CurrentSettings).to receive(:com?).and_return(false)
-
-      expect(migration).not_to receive(:migrate_in)
-
-      migration.up
-    end
-  end
-end
diff --git a/spec/migrations/schedule_populate_requirements_issue_id_spec.rb b/spec/migrations/schedule_populate_requirements_issue_id_spec.rb
deleted file mode 100644
index 000c42cc4fc7afe99f7616bb4d50fe6f667f1ec6..0000000000000000000000000000000000000000
--- a/spec/migrations/schedule_populate_requirements_issue_id_spec.rb
+++ /dev/null
@@ -1,79 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe SchedulePopulateRequirementsIssueId, feature_category: :requirements_management do
-  include MigrationHelpers::WorkItemTypesHelper
-
-  let(:issues) { table(:issues) }
-  let(:requirements) { table(:requirements) }
-  let(:namespaces) { table(:namespaces) }
-  let(:projects) { table(:projects) }
-  let(:users) { table(:users) }
-  let!(:group) { namespaces.create!(name: 'gitlab', path: 'gitlab-org') }
-  let!(:project_namespace) { namespaces.create!(name: 'project-namespace', path: 'project-namespace') }
-
-  let!(:project) do
-    projects.create!(namespace_id: group.id, project_namespace_id: project_namespace.id, name: 'gitlab', path: 'gitlab')
-  end
-
-  let(:migration) { described_class::MIGRATION }
-
-  let!(:author) do
-    users.create!(
-      email: 'author@example.com',
-      notification_email: 'author@example.com',
-      name: 'author',
-      username: 'author',
-      projects_limit: 10,
-      state: 'active')
-  end
-
-  before do
-    stub_const("#{described_class.name}::BATCH_SIZE", 2)
-  end
-
-  it 'schedules jobs for all requirements without issues in sync' do
-    Sidekiq::Testing.fake! do
-      freeze_time do
-        migrate!
-
-        # Restores the previous schema so we do not have a NOT NULL
-        # constraint on requirements.issue_id column, which would
-        # prevent us to create invalid requirement records.
-        migration_context.down(previous_migration(3).version)
-
-        requirement_1 = create_requirement(iid: 1, title: 'r 1')
-
-        # Create one requirement with issue_id present, to make
-        # sure a job won't be scheduled for it
-        work_item_type_id = table(:work_item_types).find_by(namespace_id: nil, name: 'Issue').id
-        issue = issues.create!(state_id: 1, work_item_type_id: work_item_type_id)
-        create_requirement(iid: 2, title: 'r 2', issue_id: issue.id)
-
-        requirement_3 = create_requirement(iid: 3, title: 'r 3')
-        requirement_4 = create_requirement(iid: 4, title: 'r 4')
-        requirement_5 = create_requirement(iid: 5, title: 'r 5')
-
-        migrate!
-
-        expect(migration).to be_scheduled_delayed_migration(120.seconds, requirement_1.id, requirement_3.id)
-        expect(migration).to be_scheduled_delayed_migration(240.seconds, requirement_4.id, requirement_5.id)
-        expect(BackgroundMigrationWorker.jobs.size).to eq(2)
-      end
-    end
-  end
-
-  def create_requirement(iid:, title:, issue_id: nil)
-    requirements.create!(
-      iid: iid,
-      project_id: project.id,
-      issue_id: issue_id,
-      title: title,
-      state: 1,
-      created_at: Time.now,
-      updated_at: Time.now,
-      author_id: author.id)
-  end
-end
diff --git a/spec/migrations/schedule_purging_stale_security_scans_spec.rb b/spec/migrations/schedule_purging_stale_security_scans_spec.rb
deleted file mode 100644
index 906dc90bcc44d6eebf4fce6a57283f4023c4233a..0000000000000000000000000000000000000000
--- a/spec/migrations/schedule_purging_stale_security_scans_spec.rb
+++ /dev/null
@@ -1,70 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe SchedulePurgingStaleSecurityScans, :suppress_gitlab_schemas_validate_connection,
-  feature_category: :vulnerability_management do
-  let!(:namespaces) { table(:namespaces) }
-  let!(:projects) { table(:projects) }
-  let!(:pipelines) { table(:ci_pipelines) }
-  let!(:builds) { table(:ci_builds) }
-  let!(:security_scans) { table(:security_scans) }
-
-  let!(:namespace) { namespaces.create!(name: "foo", path: "bar") }
-  let!(:project) { projects.create!(namespace_id: namespace.id, project_namespace_id: namespace.id) }
-  let!(:pipeline) { pipelines.create!(project_id: project.id, ref: 'master', sha: 'adf43c3a', status: 'success') }
-  let!(:ci_build) { builds.create!(commit_id: pipeline.id, retried: false, type: 'Ci::Build') }
-
-  let!(:security_scan_1) { security_scans.create!(build_id: ci_build.id, scan_type: 1, created_at: 92.days.ago) }
-  let!(:security_scan_2) { security_scans.create!(build_id: ci_build.id, scan_type: 2, created_at: 91.days.ago) }
-
-  let(:com?) { false }
-  let(:dev_or_test_env?) { false }
-
-  before do
-    allow(::Gitlab).to receive(:com?).and_return(com?)
-    allow(::Gitlab).to receive(:dev_or_test_env?).and_return(dev_or_test_env?)
-
-    stub_const("#{described_class.name}::BATCH_SIZE", 1)
-  end
-
-  shared_examples_for 'schedules the background jobs' do
-    before do
-      # This will not be scheduled as it's not stale
-      security_scans.create!(build_id: ci_build.id, scan_type: 3)
-    end
-
-    around do |example|
-      freeze_time { Sidekiq::Testing.fake! { example.run } }
-    end
-
-    it 'creates 2 jobs', :aggregate_failures do
-      migrate!
-
-      expect(BackgroundMigrationWorker.jobs.size).to be(2)
-      expect(described_class::MIGRATION)
-        .to be_scheduled_delayed_migration(2.minutes, security_scan_1.id, security_scan_1.id)
-      expect(described_class::MIGRATION)
-        .to be_scheduled_delayed_migration(4.minutes, security_scan_2.id, security_scan_2.id)
-    end
-  end
-
-  context 'when the migration does not run on GitLab.com or `dev_or_test_env`' do
-    it 'does not run the migration' do
-      expect { migrate! }.not_to change { BackgroundMigrationWorker.jobs.size }
-    end
-  end
-
-  context 'when the migration runs on GitLab.com' do
-    let(:com?) { true }
-
-    it_behaves_like 'schedules the background jobs'
-  end
-
-  context 'when the migration runs on dev or test env' do
-    let(:dev_or_test_env?) { true }
-
-    it_behaves_like 'schedules the background jobs'
-  end
-end
diff --git a/spec/migrations/schedule_set_correct_vulnerability_state_spec.rb b/spec/migrations/schedule_set_correct_vulnerability_state_spec.rb
deleted file mode 100644
index e888a1132c079f8ea2f483a946e72141747e308e..0000000000000000000000000000000000000000
--- a/spec/migrations/schedule_set_correct_vulnerability_state_spec.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe ScheduleSetCorrectVulnerabilityState, feature_category: :vulnerability_management do
-  let!(:migration) { described_class::MIGRATION_NAME }
-
-  describe '#up' do
-    it 'schedules background jobs for each batch of vulnerabilities' do
-      migrate!
-
-      expect(migration).to have_scheduled_batched_migration(
-        table_name: :vulnerabilities,
-        column_name: :id,
-        interval: described_class::JOB_INTERVAL,
-        batch_size: described_class::MAX_BATCH_SIZE,
-        batch_class_name: described_class::BATCH_CLASS_NAME,
-        sub_batch_size: described_class::SUB_BATCH_SIZE
-      )
-    end
-  end
-
-  describe '#down' do
-    it 'deletes all batched migration records' do
-      migrate!
-      schema_migrate_down!
-
-      expect(migration).not_to have_scheduled_batched_migration
-    end
-  end
-end
diff --git a/spec/migrations/schedule_update_timelogs_null_spent_at_spec.rb b/spec/migrations/schedule_update_timelogs_null_spent_at_spec.rb
deleted file mode 100644
index 99ee9e58f4e076d18a25df631f24ea6c9a959206..0000000000000000000000000000000000000000
--- a/spec/migrations/schedule_update_timelogs_null_spent_at_spec.rb
+++ /dev/null
@@ -1,44 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe ScheduleUpdateTimelogsNullSpentAt, feature_category: :team_planning do
-  let!(:namespace) { table(:namespaces).create!(name: 'namespace', path: 'namespace') }
-  let!(:project) { table(:projects).create!(namespace_id: namespace.id) }
-  let!(:issue) { table(:issues).create!(project_id: project.id) }
-  let!(:merge_request) { table(:merge_requests).create!(target_project_id: project.id, source_branch: 'master', target_branch: 'feature') }
-  let!(:timelog1) { create_timelog!(merge_request_id: merge_request.id) }
-  let!(:timelog2) { create_timelog!(merge_request_id: merge_request.id) }
-  let!(:timelog3) { create_timelog!(merge_request_id: merge_request.id) }
-  let!(:timelog4) { create_timelog!(issue_id: issue.id) }
-  let!(:timelog5) { create_timelog!(issue_id: issue.id) }
-
-  before do
-    table(:timelogs).where.not(id: timelog3.id).update_all(spent_at: nil)
-  end
-
-  it 'correctly schedules background migrations' do
-    stub_const("#{described_class}::BATCH_SIZE", 2)
-
-    Sidekiq::Testing.fake! do
-      freeze_time do
-        migrate!
-
-        expect(described_class::MIGRATION)
-          .to be_scheduled_delayed_migration(2.minutes, timelog1.id, timelog2.id)
-
-        expect(described_class::MIGRATION)
-          .to be_scheduled_delayed_migration(4.minutes, timelog4.id, timelog5.id)
-
-        expect(BackgroundMigrationWorker.jobs.size).to eq(2)
-      end
-    end
-  end
-
-  private
-
-  def create_timelog!(**args)
-    table(:timelogs).create!(**args, time_spent: 1)
-  end
-end
diff --git a/spec/migrations/start_backfill_ci_queuing_tables_spec.rb b/spec/migrations/start_backfill_ci_queuing_tables_spec.rb
deleted file mode 100644
index 0a189b58c9499591e805a71c9a27d8027a7c692f..0000000000000000000000000000000000000000
--- a/spec/migrations/start_backfill_ci_queuing_tables_spec.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe StartBackfillCiQueuingTables, :suppress_gitlab_schemas_validate_connection,
-  feature_category: :continuous_integration do
-  let(:namespaces) { table(:namespaces) }
-  let(:projects)   { table(:projects) }
-  let(:builds)     { table(:ci_builds) }
-
-  let!(:namespace) do
-    namespaces.create!(name: 'namespace1', path: 'namespace1')
-  end
-
-  let!(:project) do
-    projects.create!(namespace_id: namespace.id, name: 'test1', path: 'test1')
-  end
-
-  let!(:pending_build_1) do
-    builds.create!(status: :pending, name: 'test1', type: 'Ci::Build', project_id: project.id)
-  end
-
-  let!(:running_build) do
-    builds.create!(status: :running, name: 'test2', type: 'Ci::Build', project_id: project.id)
-  end
-
-  let!(:pending_build_2) do
-    builds.create!(status: :pending, name: 'test3', type: 'Ci::Build', project_id: project.id)
-  end
-
-  before do
-    stub_const("#{described_class.name}::BATCH_SIZE", 1)
-  end
-
-  it 'schedules jobs for builds that are pending' do
-    Sidekiq::Testing.fake! do
-      freeze_time do
-        migrate!
-
-        expect(described_class::MIGRATION).to be_scheduled_delayed_migration(
-          2.minutes, pending_build_1.id, pending_build_1.id)
-        expect(described_class::MIGRATION).to be_scheduled_delayed_migration(
-          4.minutes, pending_build_2.id, pending_build_2.id)
-        expect(BackgroundMigrationWorker.jobs.size).to eq(2)
-      end
-    end
-  end
-end
diff --git a/spec/migrations/toggle_vsa_aggregations_enable_spec.rb b/spec/migrations/toggle_vsa_aggregations_enable_spec.rb
deleted file mode 100644
index 5b3e513e9f628c229a682636348a9bca5ae40bcf..0000000000000000000000000000000000000000
--- a/spec/migrations/toggle_vsa_aggregations_enable_spec.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe ToggleVsaAggregationsEnable, :migration, feature_category: :value_stream_management do
-  let(:aggregations) { table(:analytics_cycle_analytics_aggregations) }
-  let(:groups) { table(:namespaces) }
-
-  let!(:group1) { groups.create!(name: 'aaa', path: 'aaa') }
-  let!(:group2) { groups.create!(name: 'aaa', path: 'aaa') }
-  let!(:group3) { groups.create!(name: 'aaa', path: 'aaa') }
-
-  let!(:aggregation1) { aggregations.create!(group_id: group1.id, enabled: false) }
-  let!(:aggregation2) { aggregations.create!(group_id: group2.id, enabled: true) }
-  let!(:aggregation3) { aggregations.create!(group_id: group3.id, enabled: false) }
-
-  it 'makes all aggregations enabled' do
-    migrate!
-
-    expect(aggregation1.reload).to be_enabled
-    expect(aggregation2.reload).to be_enabled
-    expect(aggregation3.reload).to be_enabled
-  end
-end
diff --git a/spec/migrations/update_application_settings_container_registry_exp_pol_worker_capacity_default_spec.rb b/spec/migrations/update_application_settings_container_registry_exp_pol_worker_capacity_default_spec.rb
deleted file mode 100644
index 66da9e6653d5c279d7e77124409feaf0dc78d318..0000000000000000000000000000000000000000
--- a/spec/migrations/update_application_settings_container_registry_exp_pol_worker_capacity_default_spec.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe UpdateApplicationSettingsContainerRegistryExpPolWorkerCapacityDefault,
-  feature_category: :container_registry do
-  let(:settings) { table(:application_settings) }
-
-  context 'with no rows in the application_settings table' do
-    it 'does not insert a row' do
-      expect { migrate! }.to not_change { settings.count }
-    end
-  end
-
-  context 'with a row in the application_settings table' do
-    before do
-      settings.create!(container_registry_expiration_policies_worker_capacity: capacity)
-    end
-
-    context 'with container_registry_expiration_policy_worker_capacity set to a value different than 0' do
-      let(:capacity) { 1 }
-
-      it 'does not update the row' do
-        expect { migrate! }
-          .to not_change { settings.count }
-          .and not_change { settings.first.container_registry_expiration_policies_worker_capacity }
-      end
-    end
-
-    context 'with container_registry_expiration_policy_worker_capacity set to 0' do
-      let(:capacity) { 0 }
-
-      it 'updates the existing row' do
-        expect { migrate! }
-          .to not_change { settings.count }
-          .and change { settings.first.container_registry_expiration_policies_worker_capacity }.from(0).to(4)
-      end
-    end
-  end
-end
diff --git a/spec/migrations/update_application_settings_protected_paths_spec.rb b/spec/migrations/update_application_settings_protected_paths_spec.rb
deleted file mode 100644
index c2bd4e8727d90260e4a0e07f8b9b68df81fee792..0000000000000000000000000000000000000000
--- a/spec/migrations/update_application_settings_protected_paths_spec.rb
+++ /dev/null
@@ -1,47 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe UpdateApplicationSettingsProtectedPaths, :aggregate_failures,
-  feature_category: :system_access do
-  subject(:migration) { described_class.new }
-
-  let!(:application_settings) { table(:application_settings) }
-  let!(:oauth_paths) { %w[/oauth/authorize /oauth/token] }
-  let!(:custom_paths) { %w[/foo /bar] }
-
-  let(:default_paths) { application_settings.column_defaults.fetch('protected_paths') }
-
-  before do
-    application_settings.create!(protected_paths: custom_paths)
-    application_settings.create!(protected_paths: custom_paths + oauth_paths)
-    application_settings.create!(protected_paths: custom_paths + oauth_paths.take(1))
-  end
-
-  describe '#up' do
-    before do
-      migrate!
-      application_settings.reset_column_information
-    end
-
-    it 'removes the OAuth paths from the default value and persisted records' do
-      expect(default_paths).not_to include(*oauth_paths)
-      expect(default_paths).to eq(described_class::NEW_DEFAULT_PROTECTED_PATHS)
-      expect(application_settings.all).to all(have_attributes(protected_paths: custom_paths))
-    end
-  end
-
-  describe '#down' do
-    before do
-      migrate!
-      schema_migrate_down!
-    end
-
-    it 'adds the OAuth paths to the default value and persisted records' do
-      expect(default_paths).to include(*oauth_paths)
-      expect(default_paths).to eq(described_class::OLD_DEFAULT_PROTECTED_PATHS)
-      expect(application_settings.all).to all(have_attributes(protected_paths: custom_paths + oauth_paths))
-    end
-  end
-end
diff --git a/spec/migrations/update_default_scan_method_of_dast_site_profile_spec.rb b/spec/migrations/update_default_scan_method_of_dast_site_profile_spec.rb
deleted file mode 100644
index 15a8e79a610b6a107ecfb910825d062b6e42055e..0000000000000000000000000000000000000000
--- a/spec/migrations/update_default_scan_method_of_dast_site_profile_spec.rb
+++ /dev/null
@@ -1,42 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe UpdateDefaultScanMethodOfDastSiteProfile, feature_category: :dynamic_application_security_testing do
-  let(:namespaces) { table(:namespaces) }
-  let(:projects) { table(:projects) }
-  let(:dast_sites) { table(:dast_sites) }
-  let(:dast_site_profiles) { table(:dast_site_profiles) }
-
-  before do
-    namespace = namespaces.create!(name: 'test', path: 'test')
-    project = projects.create!(id: 12, namespace_id: namespace.id, name: 'gitlab', path: 'gitlab')
-    dast_site = dast_sites.create!(id: 1, url: 'https://www.gitlab.com', project_id: project.id)
-
-    dast_site_profiles.create!(
-      id: 1,
-      project_id: project.id,
-      dast_site_id: dast_site.id,
-      name: "#{FFaker::Product.product_name.truncate(192)} #{SecureRandom.hex(4)} - 0",
-      scan_method: 0,
-      target_type: 0
-    )
-
-    dast_site_profiles.create!(
-      id: 2,
-      project_id: project.id,
-      dast_site_id: dast_site.id,
-      name: "#{FFaker::Product.product_name.truncate(192)} #{SecureRandom.hex(4)} - 1",
-      scan_method: 0,
-      target_type: 1
-    )
-  end
-
-  it 'updates the scan_method to 1 for profiles with target_type 1' do
-    migrate!
-
-    expect(dast_site_profiles.where(scan_method: 1).count).to eq 1
-    expect(dast_site_profiles.where(scan_method: 0).count).to eq 1
-  end
-end
diff --git a/spec/migrations/update_invalid_member_states_spec.rb b/spec/migrations/update_invalid_member_states_spec.rb
deleted file mode 100644
index 2845a703ae32f5385d38ed2504ad3a0ed38932a0..0000000000000000000000000000000000000000
--- a/spec/migrations/update_invalid_member_states_spec.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-require_migration!
-
-RSpec.describe UpdateInvalidMemberStates, feature_category: :groups_and_projects do
-  let(:members) { table(:members) }
-  let(:groups) { table(:namespaces) }
-  let(:projects) { table(:projects) }
-  let(:users) { table(:users) }
-
-  before do
-    user = users.create!(first_name: 'Test', last_name: 'User', email: 'test@user.com', projects_limit: 1)
-    group = groups.create!(name: 'gitlab', path: 'gitlab-org')
-    project = projects.create!(namespace_id: group.id)
-
-    members.create!(state: 2, source_id: group.id, source_type: 'Group', type: 'GroupMember', user_id: user.id, access_level: 50, notification_level: 0)
-    members.create!(state: 2, source_id: project.id, source_type: 'Project', type: 'ProjectMember', user_id: user.id, access_level: 50, notification_level: 0)
-    members.create!(state: 1, source_id: group.id, source_type: 'Group', type: 'GroupMember', user_id: user.id, access_level: 50, notification_level: 0)
-    members.create!(state: 0, source_id: group.id, source_type: 'Group', type: 'GroupMember', user_id: user.id, access_level: 50, notification_level: 0)
-  end
-
-  it 'updates matching member record states' do
-    expect { migrate! }
-      .to change { members.where(state: 0).count }.from(1).to(3)
-      .and change { members.where(state: 2).count }.from(2).to(0)
-      .and change { members.where(state: 1).count }.by(0)
-  end
-end