From e8d2bf3e40e2165e715d9c059ab928102d9e36e4 Mon Sep 17 00:00:00 2001
From: Chloe Fons <cfons@gitlab.com>
Date: Tue, 4 Feb 2025 13:07:33 +0000
Subject: [PATCH] Add indexes to registry tables

In order to be able to order the records by
`verified_at` and `last_synced_at`, add an index
on each field, for each table.

EE: true
Relates to: https://gitlab.com/gitlab-org/gitlab/-/issues/514998
---
 ..._verified_at_to_ci_secure_file_registry.rb | 18 +++++
 ...ied_at_to_container_repository_registry.rb | 18 +++++
 ...t_to_dependency_proxy_manifest_registry.rb | 18 +++++
 ...ed_at_to_dependency_proxy_blob_registry.rb | 18 +++++
 ...o_design_management_repository_registry.rb | 18 +++++
 ...d_index_on_verified_at_to_file_registry.rb | 18 +++++
 ...ed_at_to_group_wiki_repository_registry.rb | 18 +++++
 ...on_verified_at_to_job_artifact_registry.rb | 18 +++++
 ...x_on_verified_at_to_lfs_object_registry.rb | 18 +++++
 ...ified_at_to_merge_request_diff_registry.rb | 18 +++++
 ...on_verified_at_to_package_file_registry.rb | 18 +++++
 ...erified_at_to_pages_deployment_registry.rb | 18 +++++
 ...rified_at_to_pipeline_artifact_registry.rb | 18 +++++
 ...ified_at_to_project_repository_registry.rb | 18 +++++
 ..._at_to_project_wiki_repository_registry.rb | 18 +++++
 ...ified_at_to_snippet_repository_registry.rb | 18 +++++
 ..._at_to_terraform_state_version_registry.rb | 18 +++++
 ...st_synced_at_to_ci_secure_file_registry.rb | 18 +++++
 ...ced_at_to_container_repository_registry.rb | 18 +++++
 ...t_to_dependency_proxy_manifest_registry.rb | 18 +++++
 ...ed_at_to_dependency_proxy_blob_registry.rb | 18 +++++
 ...o_design_management_repository_registry.rb | 18 +++++
 ...ndex_on_last_synced_at_to_file_registry.rb | 18 +++++
 ...ed_at_to_group_wiki_repository_registry.rb | 18 +++++
 ...last_synced_at_to_job_artifact_registry.rb | 18 +++++
 ...n_last_synced_at_to_lfs_object_registry.rb | 18 +++++
 ...ynced_at_to_merge_request_diff_registry.rb | 18 +++++
 ...last_synced_at_to_package_file_registry.rb | 18 +++++
 ..._synced_at_to_pages_deployment_registry.rb | 18 +++++
 ...synced_at_to_pipeline_artifact_registry.rb | 18 +++++
 ...ynced_at_to_project_repository_registry.rb | 18 +++++
 ..._at_to_project_wiki_repository_registry.rb | 18 +++++
 ...ynced_at_to_snippet_repository_registry.rb | 18 +++++
 ..._at_to_terraform_state_version_registry.rb | 18 +++++
 ee/db/geo/schema_migrations/20250130133254    |  1 +
 ee/db/geo/schema_migrations/20250130151633    |  1 +
 ee/db/geo/schema_migrations/20250130152121    |  1 +
 ee/db/geo/schema_migrations/20250130152341    |  1 +
 ee/db/geo/schema_migrations/20250130152714    |  1 +
 ee/db/geo/schema_migrations/20250130152854    |  1 +
 ee/db/geo/schema_migrations/20250130162025    |  1 +
 ee/db/geo/schema_migrations/20250130162149    |  1 +
 ee/db/geo/schema_migrations/20250130162305    |  1 +
 ee/db/geo/schema_migrations/20250130162439    |  1 +
 ee/db/geo/schema_migrations/20250130162544    |  1 +
 ee/db/geo/schema_migrations/20250130162644    |  1 +
 ee/db/geo/schema_migrations/20250130162758    |  1 +
 ee/db/geo/schema_migrations/20250130162916    |  1 +
 ee/db/geo/schema_migrations/20250130163019    |  1 +
 ee/db/geo/schema_migrations/20250130163143    |  1 +
 ee/db/geo/schema_migrations/20250130163310    |  1 +
 ee/db/geo/schema_migrations/20250204103658    |  1 +
 ee/db/geo/schema_migrations/20250204103959    |  1 +
 ee/db/geo/schema_migrations/20250204104245    |  1 +
 ee/db/geo/schema_migrations/20250204104353    |  1 +
 ee/db/geo/schema_migrations/20250204104518    |  1 +
 ee/db/geo/schema_migrations/20250204104633    |  1 +
 ee/db/geo/schema_migrations/20250204104739    |  1 +
 ee/db/geo/schema_migrations/20250204104900    |  1 +
 ee/db/geo/schema_migrations/20250204105011    |  1 +
 ee/db/geo/schema_migrations/20250204105125    |  1 +
 ee/db/geo/schema_migrations/20250204105310    |  1 +
 ee/db/geo/schema_migrations/20250204105409    |  1 +
 ee/db/geo/schema_migrations/20250204105535    |  1 +
 ee/db/geo/schema_migrations/20250204105647    |  1 +
 ee/db/geo/schema_migrations/20250204105751    |  1 +
 ee/db/geo/schema_migrations/20250204105847    |  1 +
 ee/db/geo/schema_migrations/20250204110014    |  1 +
 ee/db/geo/structure.sql                       | 68 +++++++++++++++++++
 69 files changed, 714 insertions(+)
 create mode 100644 ee/db/geo/post_migrate/20250130133254_add_index_on_verified_at_to_ci_secure_file_registry.rb
 create mode 100644 ee/db/geo/post_migrate/20250130151633_add_index_on_verified_at_to_container_repository_registry.rb
 create mode 100644 ee/db/geo/post_migrate/20250130152121_add_index_on_verified_at_to_dependency_proxy_manifest_registry.rb
 create mode 100644 ee/db/geo/post_migrate/20250130152341_add_index_on_verified_at_to_dependency_proxy_blob_registry.rb
 create mode 100644 ee/db/geo/post_migrate/20250130152714_add_index_on_verified_at_to_design_management_repository_registry.rb
 create mode 100644 ee/db/geo/post_migrate/20250130152854_add_index_on_verified_at_to_file_registry.rb
 create mode 100644 ee/db/geo/post_migrate/20250130162025_add_index_on_verified_at_to_group_wiki_repository_registry.rb
 create mode 100644 ee/db/geo/post_migrate/20250130162149_add_index_on_verified_at_to_job_artifact_registry.rb
 create mode 100644 ee/db/geo/post_migrate/20250130162305_add_index_on_verified_at_to_lfs_object_registry.rb
 create mode 100644 ee/db/geo/post_migrate/20250130162439_add_index_on_verified_at_to_merge_request_diff_registry.rb
 create mode 100644 ee/db/geo/post_migrate/20250130162544_add_index_on_verified_at_to_package_file_registry.rb
 create mode 100644 ee/db/geo/post_migrate/20250130162644_add_index_on_verified_at_to_pages_deployment_registry.rb
 create mode 100644 ee/db/geo/post_migrate/20250130162758_add_index_on_verified_at_to_pipeline_artifact_registry.rb
 create mode 100644 ee/db/geo/post_migrate/20250130162916_add_index_on_verified_at_to_project_repository_registry.rb
 create mode 100644 ee/db/geo/post_migrate/20250130163019_add_index_on_verified_at_to_project_wiki_repository_registry.rb
 create mode 100644 ee/db/geo/post_migrate/20250130163143_add_index_on_verified_at_to_snippet_repository_registry.rb
 create mode 100644 ee/db/geo/post_migrate/20250130163310_add_index_on_verified_at_to_terraform_state_version_registry.rb
 create mode 100644 ee/db/geo/post_migrate/20250204103658_add_index_on_last_synced_at_to_ci_secure_file_registry.rb
 create mode 100644 ee/db/geo/post_migrate/20250204103959_add_index_on_last_synced_at_to_container_repository_registry.rb
 create mode 100644 ee/db/geo/post_migrate/20250204104245_add_index_on_last_synced_at_to_dependency_proxy_manifest_registry.rb
 create mode 100644 ee/db/geo/post_migrate/20250204104353_add_index_on_last_synced_at_to_dependency_proxy_blob_registry.rb
 create mode 100644 ee/db/geo/post_migrate/20250204104518_add_index_on_last_synced_at_to_design_management_repository_registry.rb
 create mode 100644 ee/db/geo/post_migrate/20250204104633_add_index_on_last_synced_at_to_file_registry.rb
 create mode 100644 ee/db/geo/post_migrate/20250204104739_add_index_on_last_synced_at_to_group_wiki_repository_registry.rb
 create mode 100644 ee/db/geo/post_migrate/20250204104900_add_index_on_last_synced_at_to_job_artifact_registry.rb
 create mode 100644 ee/db/geo/post_migrate/20250204105011_add_index_on_last_synced_at_to_lfs_object_registry.rb
 create mode 100644 ee/db/geo/post_migrate/20250204105125_add_index_on_last_synced_at_to_merge_request_diff_registry.rb
 create mode 100644 ee/db/geo/post_migrate/20250204105310_add_index_on_last_synced_at_to_package_file_registry.rb
 create mode 100644 ee/db/geo/post_migrate/20250204105409_add_index_on_last_synced_at_to_pages_deployment_registry.rb
 create mode 100644 ee/db/geo/post_migrate/20250204105535_add_index_on_last_synced_at_to_pipeline_artifact_registry.rb
 create mode 100644 ee/db/geo/post_migrate/20250204105647_add_index_on_last_synced_at_to_project_repository_registry.rb
 create mode 100644 ee/db/geo/post_migrate/20250204105751_add_index_on_last_synced_at_to_project_wiki_repository_registry.rb
 create mode 100644 ee/db/geo/post_migrate/20250204105847_add_index_on_last_synced_at_to_snippet_repository_registry.rb
 create mode 100644 ee/db/geo/post_migrate/20250204110014_add_index_on_last_synced_at_to_terraform_state_version_registry.rb
 create mode 100644 ee/db/geo/schema_migrations/20250130133254
 create mode 100644 ee/db/geo/schema_migrations/20250130151633
 create mode 100644 ee/db/geo/schema_migrations/20250130152121
 create mode 100644 ee/db/geo/schema_migrations/20250130152341
 create mode 100644 ee/db/geo/schema_migrations/20250130152714
 create mode 100644 ee/db/geo/schema_migrations/20250130152854
 create mode 100644 ee/db/geo/schema_migrations/20250130162025
 create mode 100644 ee/db/geo/schema_migrations/20250130162149
 create mode 100644 ee/db/geo/schema_migrations/20250130162305
 create mode 100644 ee/db/geo/schema_migrations/20250130162439
 create mode 100644 ee/db/geo/schema_migrations/20250130162544
 create mode 100644 ee/db/geo/schema_migrations/20250130162644
 create mode 100644 ee/db/geo/schema_migrations/20250130162758
 create mode 100644 ee/db/geo/schema_migrations/20250130162916
 create mode 100644 ee/db/geo/schema_migrations/20250130163019
 create mode 100644 ee/db/geo/schema_migrations/20250130163143
 create mode 100644 ee/db/geo/schema_migrations/20250130163310
 create mode 100644 ee/db/geo/schema_migrations/20250204103658
 create mode 100644 ee/db/geo/schema_migrations/20250204103959
 create mode 100644 ee/db/geo/schema_migrations/20250204104245
 create mode 100644 ee/db/geo/schema_migrations/20250204104353
 create mode 100644 ee/db/geo/schema_migrations/20250204104518
 create mode 100644 ee/db/geo/schema_migrations/20250204104633
 create mode 100644 ee/db/geo/schema_migrations/20250204104739
 create mode 100644 ee/db/geo/schema_migrations/20250204104900
 create mode 100644 ee/db/geo/schema_migrations/20250204105011
 create mode 100644 ee/db/geo/schema_migrations/20250204105125
 create mode 100644 ee/db/geo/schema_migrations/20250204105310
 create mode 100644 ee/db/geo/schema_migrations/20250204105409
 create mode 100644 ee/db/geo/schema_migrations/20250204105535
 create mode 100644 ee/db/geo/schema_migrations/20250204105647
 create mode 100644 ee/db/geo/schema_migrations/20250204105751
 create mode 100644 ee/db/geo/schema_migrations/20250204105847
 create mode 100644 ee/db/geo/schema_migrations/20250204110014

diff --git a/ee/db/geo/post_migrate/20250130133254_add_index_on_verified_at_to_ci_secure_file_registry.rb b/ee/db/geo/post_migrate/20250130133254_add_index_on_verified_at_to_ci_secure_file_registry.rb
new file mode 100644
index 000000000000..d26128084f90
--- /dev/null
+++ b/ee/db/geo/post_migrate/20250130133254_add_index_on_verified_at_to_ci_secure_file_registry.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnVerifiedAtToCiSecureFileRegistry < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.9'
+
+  TABLE = :ci_secure_file_registry
+  INDEX = 'index_ci_secure_file_registry_on_verified_at'
+
+  def up
+    add_concurrent_index TABLE, :verified_at, name: INDEX
+  end
+
+  def down
+    remove_concurrent_index_by_name TABLE, INDEX
+  end
+end
diff --git a/ee/db/geo/post_migrate/20250130151633_add_index_on_verified_at_to_container_repository_registry.rb b/ee/db/geo/post_migrate/20250130151633_add_index_on_verified_at_to_container_repository_registry.rb
new file mode 100644
index 000000000000..705cc7ac8efc
--- /dev/null
+++ b/ee/db/geo/post_migrate/20250130151633_add_index_on_verified_at_to_container_repository_registry.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnVerifiedAtToContainerRepositoryRegistry < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.9'
+
+  TABLE = :container_repository_registry
+  INDEX = 'index_container_repository_registry_on_verified_at'
+
+  def up
+    add_concurrent_index TABLE, :verified_at, name: INDEX
+  end
+
+  def down
+    remove_concurrent_index_by_name TABLE, INDEX
+  end
+end
diff --git a/ee/db/geo/post_migrate/20250130152121_add_index_on_verified_at_to_dependency_proxy_manifest_registry.rb b/ee/db/geo/post_migrate/20250130152121_add_index_on_verified_at_to_dependency_proxy_manifest_registry.rb
new file mode 100644
index 000000000000..240a6f195c00
--- /dev/null
+++ b/ee/db/geo/post_migrate/20250130152121_add_index_on_verified_at_to_dependency_proxy_manifest_registry.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnVerifiedAtToDependencyProxyManifestRegistry < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.9'
+
+  TABLE = :dependency_proxy_manifest_registry
+  INDEX = 'index_dependency_proxy_manifest_registry_on_verified_at'
+
+  def up
+    add_concurrent_index TABLE, :verified_at, name: INDEX
+  end
+
+  def down
+    remove_concurrent_index_by_name TABLE, INDEX
+  end
+end
diff --git a/ee/db/geo/post_migrate/20250130152341_add_index_on_verified_at_to_dependency_proxy_blob_registry.rb b/ee/db/geo/post_migrate/20250130152341_add_index_on_verified_at_to_dependency_proxy_blob_registry.rb
new file mode 100644
index 000000000000..33ed76056a0b
--- /dev/null
+++ b/ee/db/geo/post_migrate/20250130152341_add_index_on_verified_at_to_dependency_proxy_blob_registry.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnVerifiedAtToDependencyProxyBlobRegistry < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.9'
+
+  TABLE = :dependency_proxy_blob_registry
+  INDEX = 'index_dependency_proxy_blob_registry_on_verified_at'
+
+  def up
+    add_concurrent_index TABLE, :verified_at, name: INDEX
+  end
+
+  def down
+    remove_concurrent_index_by_name TABLE, INDEX
+  end
+end
diff --git a/ee/db/geo/post_migrate/20250130152714_add_index_on_verified_at_to_design_management_repository_registry.rb b/ee/db/geo/post_migrate/20250130152714_add_index_on_verified_at_to_design_management_repository_registry.rb
new file mode 100644
index 000000000000..4f06943b88fb
--- /dev/null
+++ b/ee/db/geo/post_migrate/20250130152714_add_index_on_verified_at_to_design_management_repository_registry.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnVerifiedAtToDesignManagementRepositoryRegistry < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.9'
+
+  TABLE = :design_management_repository_registry
+  INDEX = 'index_design_management_repository_registry_on_verified_at'
+
+  def up
+    add_concurrent_index TABLE, :verified_at, name: INDEX
+  end
+
+  def down
+    remove_concurrent_index_by_name TABLE, INDEX
+  end
+end
diff --git a/ee/db/geo/post_migrate/20250130152854_add_index_on_verified_at_to_file_registry.rb b/ee/db/geo/post_migrate/20250130152854_add_index_on_verified_at_to_file_registry.rb
new file mode 100644
index 000000000000..f7dc22eb2b2b
--- /dev/null
+++ b/ee/db/geo/post_migrate/20250130152854_add_index_on_verified_at_to_file_registry.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnVerifiedAtToFileRegistry < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.9'
+
+  TABLE = :file_registry
+  INDEX = 'index_file_registry_on_verified_at'
+
+  def up
+    add_concurrent_index TABLE, :verified_at, name: INDEX
+  end
+
+  def down
+    remove_concurrent_index_by_name TABLE, INDEX
+  end
+end
diff --git a/ee/db/geo/post_migrate/20250130162025_add_index_on_verified_at_to_group_wiki_repository_registry.rb b/ee/db/geo/post_migrate/20250130162025_add_index_on_verified_at_to_group_wiki_repository_registry.rb
new file mode 100644
index 000000000000..065edf4905c3
--- /dev/null
+++ b/ee/db/geo/post_migrate/20250130162025_add_index_on_verified_at_to_group_wiki_repository_registry.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnVerifiedAtToGroupWikiRepositoryRegistry < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.9'
+
+  TABLE = :group_wiki_repository_registry
+  INDEX = 'index_group_wiki_repository_registry_on_verified_at'
+
+  def up
+    add_concurrent_index TABLE, :verified_at, name: INDEX
+  end
+
+  def down
+    remove_concurrent_index_by_name TABLE, INDEX
+  end
+end
diff --git a/ee/db/geo/post_migrate/20250130162149_add_index_on_verified_at_to_job_artifact_registry.rb b/ee/db/geo/post_migrate/20250130162149_add_index_on_verified_at_to_job_artifact_registry.rb
new file mode 100644
index 000000000000..837ea06cfee0
--- /dev/null
+++ b/ee/db/geo/post_migrate/20250130162149_add_index_on_verified_at_to_job_artifact_registry.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnVerifiedAtToJobArtifactRegistry < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.9'
+
+  TABLE = :job_artifact_registry
+  INDEX = 'index_job_artifact_registry_on_verified_at'
+
+  def up
+    add_concurrent_index TABLE, :verified_at, name: INDEX
+  end
+
+  def down
+    remove_concurrent_index_by_name TABLE, INDEX
+  end
+end
diff --git a/ee/db/geo/post_migrate/20250130162305_add_index_on_verified_at_to_lfs_object_registry.rb b/ee/db/geo/post_migrate/20250130162305_add_index_on_verified_at_to_lfs_object_registry.rb
new file mode 100644
index 000000000000..f17bdf781add
--- /dev/null
+++ b/ee/db/geo/post_migrate/20250130162305_add_index_on_verified_at_to_lfs_object_registry.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnVerifiedAtToLfsObjectRegistry < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.9'
+
+  TABLE = :lfs_object_registry
+  INDEX = 'index_lfs_object_registry_on_verified_at'
+
+  def up
+    add_concurrent_index TABLE, :verified_at, name: INDEX
+  end
+
+  def down
+    remove_concurrent_index_by_name TABLE, INDEX
+  end
+end
diff --git a/ee/db/geo/post_migrate/20250130162439_add_index_on_verified_at_to_merge_request_diff_registry.rb b/ee/db/geo/post_migrate/20250130162439_add_index_on_verified_at_to_merge_request_diff_registry.rb
new file mode 100644
index 000000000000..93bca6b0d60f
--- /dev/null
+++ b/ee/db/geo/post_migrate/20250130162439_add_index_on_verified_at_to_merge_request_diff_registry.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnVerifiedAtToMergeRequestDiffRegistry < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.9'
+
+  TABLE = :merge_request_diff_registry
+  INDEX = 'index_merge_request_diff_registry_on_verified_at'
+
+  def up
+    add_concurrent_index TABLE, :verified_at, name: INDEX
+  end
+
+  def down
+    remove_concurrent_index_by_name TABLE, INDEX
+  end
+end
diff --git a/ee/db/geo/post_migrate/20250130162544_add_index_on_verified_at_to_package_file_registry.rb b/ee/db/geo/post_migrate/20250130162544_add_index_on_verified_at_to_package_file_registry.rb
new file mode 100644
index 000000000000..1f15635355f9
--- /dev/null
+++ b/ee/db/geo/post_migrate/20250130162544_add_index_on_verified_at_to_package_file_registry.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnVerifiedAtToPackageFileRegistry < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.9'
+
+  TABLE = :package_file_registry
+  INDEX = 'index_package_file_registry_on_verified_at'
+
+  def up
+    add_concurrent_index TABLE, :verified_at, name: INDEX
+  end
+
+  def down
+    remove_concurrent_index_by_name TABLE, INDEX
+  end
+end
diff --git a/ee/db/geo/post_migrate/20250130162644_add_index_on_verified_at_to_pages_deployment_registry.rb b/ee/db/geo/post_migrate/20250130162644_add_index_on_verified_at_to_pages_deployment_registry.rb
new file mode 100644
index 000000000000..5e4c2e670a16
--- /dev/null
+++ b/ee/db/geo/post_migrate/20250130162644_add_index_on_verified_at_to_pages_deployment_registry.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnVerifiedAtToPagesDeploymentRegistry < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.9'
+
+  TABLE = :pages_deployment_registry
+  INDEX = 'index_pages_deployment_registry_on_verified_at'
+
+  def up
+    add_concurrent_index TABLE, :verified_at, name: INDEX
+  end
+
+  def down
+    remove_concurrent_index_by_name TABLE, INDEX
+  end
+end
diff --git a/ee/db/geo/post_migrate/20250130162758_add_index_on_verified_at_to_pipeline_artifact_registry.rb b/ee/db/geo/post_migrate/20250130162758_add_index_on_verified_at_to_pipeline_artifact_registry.rb
new file mode 100644
index 000000000000..1603422c3044
--- /dev/null
+++ b/ee/db/geo/post_migrate/20250130162758_add_index_on_verified_at_to_pipeline_artifact_registry.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnVerifiedAtToPipelineArtifactRegistry < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.9'
+
+  TABLE = :pipeline_artifact_registry
+  INDEX = 'index_pipeline_artifact_registry_on_verified_at'
+
+  def up
+    add_concurrent_index TABLE, :verified_at, name: INDEX
+  end
+
+  def down
+    remove_concurrent_index_by_name TABLE, INDEX
+  end
+end
diff --git a/ee/db/geo/post_migrate/20250130162916_add_index_on_verified_at_to_project_repository_registry.rb b/ee/db/geo/post_migrate/20250130162916_add_index_on_verified_at_to_project_repository_registry.rb
new file mode 100644
index 000000000000..6945c4ff5b02
--- /dev/null
+++ b/ee/db/geo/post_migrate/20250130162916_add_index_on_verified_at_to_project_repository_registry.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnVerifiedAtToProjectRepositoryRegistry < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.9'
+
+  TABLE = :project_repository_registry
+  INDEX = 'index_project_repository_registry_on_verified_at'
+
+  def up
+    add_concurrent_index TABLE, :verified_at, name: INDEX
+  end
+
+  def down
+    remove_concurrent_index_by_name TABLE, INDEX
+  end
+end
diff --git a/ee/db/geo/post_migrate/20250130163019_add_index_on_verified_at_to_project_wiki_repository_registry.rb b/ee/db/geo/post_migrate/20250130163019_add_index_on_verified_at_to_project_wiki_repository_registry.rb
new file mode 100644
index 000000000000..621ed902dee1
--- /dev/null
+++ b/ee/db/geo/post_migrate/20250130163019_add_index_on_verified_at_to_project_wiki_repository_registry.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnVerifiedAtToProjectWikiRepositoryRegistry < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.9'
+
+  TABLE = :project_wiki_repository_registry
+  INDEX = 'index_project_wiki_repository_registry_on_verified_at'
+
+  def up
+    add_concurrent_index TABLE, :verified_at, name: INDEX
+  end
+
+  def down
+    remove_concurrent_index_by_name TABLE, INDEX
+  end
+end
diff --git a/ee/db/geo/post_migrate/20250130163143_add_index_on_verified_at_to_snippet_repository_registry.rb b/ee/db/geo/post_migrate/20250130163143_add_index_on_verified_at_to_snippet_repository_registry.rb
new file mode 100644
index 000000000000..feac8ca6e0b0
--- /dev/null
+++ b/ee/db/geo/post_migrate/20250130163143_add_index_on_verified_at_to_snippet_repository_registry.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnVerifiedAtToSnippetRepositoryRegistry < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.9'
+
+  TABLE = :snippet_repository_registry
+  INDEX = 'index_snippet_repository_registry_on_verified_at'
+
+  def up
+    add_concurrent_index TABLE, :verified_at, name: INDEX
+  end
+
+  def down
+    remove_concurrent_index_by_name TABLE, INDEX
+  end
+end
diff --git a/ee/db/geo/post_migrate/20250130163310_add_index_on_verified_at_to_terraform_state_version_registry.rb b/ee/db/geo/post_migrate/20250130163310_add_index_on_verified_at_to_terraform_state_version_registry.rb
new file mode 100644
index 000000000000..2f49ed0c24f8
--- /dev/null
+++ b/ee/db/geo/post_migrate/20250130163310_add_index_on_verified_at_to_terraform_state_version_registry.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnVerifiedAtToTerraformStateVersionRegistry < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.9'
+
+  TABLE = :terraform_state_version_registry
+  INDEX = 'index_terraform_state_version_registry_on_verified_at'
+
+  def up
+    add_concurrent_index TABLE, :verified_at, name: INDEX
+  end
+
+  def down
+    remove_concurrent_index_by_name TABLE, INDEX
+  end
+end
diff --git a/ee/db/geo/post_migrate/20250204103658_add_index_on_last_synced_at_to_ci_secure_file_registry.rb b/ee/db/geo/post_migrate/20250204103658_add_index_on_last_synced_at_to_ci_secure_file_registry.rb
new file mode 100644
index 000000000000..0bcf96ce6f4a
--- /dev/null
+++ b/ee/db/geo/post_migrate/20250204103658_add_index_on_last_synced_at_to_ci_secure_file_registry.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnLastSyncedAtToCiSecureFileRegistry < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.9'
+
+  TABLE = :ci_secure_file_registry
+  INDEX = 'index_ci_secure_file_registry_on_last_synced_at'
+
+  def up
+    add_concurrent_index TABLE, :last_synced_at, name: INDEX
+  end
+
+  def down
+    remove_concurrent_index_by_name TABLE, INDEX
+  end
+end
diff --git a/ee/db/geo/post_migrate/20250204103959_add_index_on_last_synced_at_to_container_repository_registry.rb b/ee/db/geo/post_migrate/20250204103959_add_index_on_last_synced_at_to_container_repository_registry.rb
new file mode 100644
index 000000000000..98a505ebdff1
--- /dev/null
+++ b/ee/db/geo/post_migrate/20250204103959_add_index_on_last_synced_at_to_container_repository_registry.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnLastSyncedAtToContainerRepositoryRegistry < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.9'
+
+  TABLE = :container_repository_registry
+  INDEX = 'index_container_repository_registry_on_last_synced_at'
+
+  def up
+    add_concurrent_index TABLE, :last_synced_at, name: INDEX
+  end
+
+  def down
+    remove_concurrent_index_by_name TABLE, INDEX
+  end
+end
diff --git a/ee/db/geo/post_migrate/20250204104245_add_index_on_last_synced_at_to_dependency_proxy_manifest_registry.rb b/ee/db/geo/post_migrate/20250204104245_add_index_on_last_synced_at_to_dependency_proxy_manifest_registry.rb
new file mode 100644
index 000000000000..97eeba649ca6
--- /dev/null
+++ b/ee/db/geo/post_migrate/20250204104245_add_index_on_last_synced_at_to_dependency_proxy_manifest_registry.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnLastSyncedAtToDependencyProxyManifestRegistry < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.9'
+
+  TABLE = :dependency_proxy_manifest_registry
+  INDEX = 'index_dependency_proxy_manifest_registry_on_last_synced_at'
+
+  def up
+    add_concurrent_index TABLE, :last_synced_at, name: INDEX
+  end
+
+  def down
+    remove_concurrent_index_by_name TABLE, INDEX
+  end
+end
diff --git a/ee/db/geo/post_migrate/20250204104353_add_index_on_last_synced_at_to_dependency_proxy_blob_registry.rb b/ee/db/geo/post_migrate/20250204104353_add_index_on_last_synced_at_to_dependency_proxy_blob_registry.rb
new file mode 100644
index 000000000000..edcaeb794b89
--- /dev/null
+++ b/ee/db/geo/post_migrate/20250204104353_add_index_on_last_synced_at_to_dependency_proxy_blob_registry.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnLastSyncedAtToDependencyProxyBlobRegistry < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.9'
+
+  TABLE = :dependency_proxy_blob_registry
+  INDEX = 'index_dependency_proxy_blob_registry_on_last_synced_at'
+
+  def up
+    add_concurrent_index TABLE, :last_synced_at, name: INDEX
+  end
+
+  def down
+    remove_concurrent_index_by_name TABLE, INDEX
+  end
+end
diff --git a/ee/db/geo/post_migrate/20250204104518_add_index_on_last_synced_at_to_design_management_repository_registry.rb b/ee/db/geo/post_migrate/20250204104518_add_index_on_last_synced_at_to_design_management_repository_registry.rb
new file mode 100644
index 000000000000..213760fd3ed5
--- /dev/null
+++ b/ee/db/geo/post_migrate/20250204104518_add_index_on_last_synced_at_to_design_management_repository_registry.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnLastSyncedAtToDesignManagementRepositoryRegistry < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.9'
+
+  TABLE = :design_management_repository_registry
+  INDEX = 'index_design_management_repository_registry_on_last_synced_at'
+
+  def up
+    add_concurrent_index TABLE, :last_synced_at, name: INDEX
+  end
+
+  def down
+    remove_concurrent_index_by_name TABLE, INDEX
+  end
+end
diff --git a/ee/db/geo/post_migrate/20250204104633_add_index_on_last_synced_at_to_file_registry.rb b/ee/db/geo/post_migrate/20250204104633_add_index_on_last_synced_at_to_file_registry.rb
new file mode 100644
index 000000000000..9db735552a77
--- /dev/null
+++ b/ee/db/geo/post_migrate/20250204104633_add_index_on_last_synced_at_to_file_registry.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnLastSyncedAtToFileRegistry < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.9'
+
+  TABLE = :file_registry
+  INDEX = 'index_file_registry_on_last_synced_at'
+
+  def up
+    add_concurrent_index TABLE, :last_synced_at, name: INDEX
+  end
+
+  def down
+    remove_concurrent_index_by_name TABLE, INDEX
+  end
+end
diff --git a/ee/db/geo/post_migrate/20250204104739_add_index_on_last_synced_at_to_group_wiki_repository_registry.rb b/ee/db/geo/post_migrate/20250204104739_add_index_on_last_synced_at_to_group_wiki_repository_registry.rb
new file mode 100644
index 000000000000..ac0bcda22255
--- /dev/null
+++ b/ee/db/geo/post_migrate/20250204104739_add_index_on_last_synced_at_to_group_wiki_repository_registry.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnLastSyncedAtToGroupWikiRepositoryRegistry < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.9'
+
+  TABLE = :group_wiki_repository_registry
+  INDEX = 'index_group_wiki_repository_registry_on_last_synced_at'
+
+  def up
+    add_concurrent_index TABLE, :last_synced_at, name: INDEX
+  end
+
+  def down
+    remove_concurrent_index_by_name TABLE, INDEX
+  end
+end
diff --git a/ee/db/geo/post_migrate/20250204104900_add_index_on_last_synced_at_to_job_artifact_registry.rb b/ee/db/geo/post_migrate/20250204104900_add_index_on_last_synced_at_to_job_artifact_registry.rb
new file mode 100644
index 000000000000..5960cfa21672
--- /dev/null
+++ b/ee/db/geo/post_migrate/20250204104900_add_index_on_last_synced_at_to_job_artifact_registry.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnLastSyncedAtToJobArtifactRegistry < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.9'
+
+  TABLE = :job_artifact_registry
+  INDEX = 'index_job_artifact_registry_on_last_synced_at'
+
+  def up
+    add_concurrent_index TABLE, :last_synced_at, name: INDEX
+  end
+
+  def down
+    remove_concurrent_index_by_name TABLE, INDEX
+  end
+end
diff --git a/ee/db/geo/post_migrate/20250204105011_add_index_on_last_synced_at_to_lfs_object_registry.rb b/ee/db/geo/post_migrate/20250204105011_add_index_on_last_synced_at_to_lfs_object_registry.rb
new file mode 100644
index 000000000000..77c3d496a601
--- /dev/null
+++ b/ee/db/geo/post_migrate/20250204105011_add_index_on_last_synced_at_to_lfs_object_registry.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnLastSyncedAtToLfsObjectRegistry < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.9'
+
+  TABLE = :lfs_object_registry
+  INDEX = 'index_lfs_object_registry_on_last_synced_at'
+
+  def up
+    add_concurrent_index TABLE, :last_synced_at, name: INDEX
+  end
+
+  def down
+    remove_concurrent_index_by_name TABLE, INDEX
+  end
+end
diff --git a/ee/db/geo/post_migrate/20250204105125_add_index_on_last_synced_at_to_merge_request_diff_registry.rb b/ee/db/geo/post_migrate/20250204105125_add_index_on_last_synced_at_to_merge_request_diff_registry.rb
new file mode 100644
index 000000000000..26fe78e3e558
--- /dev/null
+++ b/ee/db/geo/post_migrate/20250204105125_add_index_on_last_synced_at_to_merge_request_diff_registry.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnLastSyncedAtToMergeRequestDiffRegistry < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.9'
+
+  TABLE = :merge_request_diff_registry
+  INDEX = 'index_merge_request_diff_registry_on_last_synced_at'
+
+  def up
+    add_concurrent_index TABLE, :last_synced_at, name: INDEX
+  end
+
+  def down
+    remove_concurrent_index_by_name TABLE, INDEX
+  end
+end
diff --git a/ee/db/geo/post_migrate/20250204105310_add_index_on_last_synced_at_to_package_file_registry.rb b/ee/db/geo/post_migrate/20250204105310_add_index_on_last_synced_at_to_package_file_registry.rb
new file mode 100644
index 000000000000..10adf0827a41
--- /dev/null
+++ b/ee/db/geo/post_migrate/20250204105310_add_index_on_last_synced_at_to_package_file_registry.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnLastSyncedAtToPackageFileRegistry < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.9'
+
+  TABLE = :package_file_registry
+  INDEX = 'index_package_file_registry_on_last_synced_at'
+
+  def up
+    add_concurrent_index TABLE, :last_synced_at, name: INDEX
+  end
+
+  def down
+    remove_concurrent_index_by_name TABLE, INDEX
+  end
+end
diff --git a/ee/db/geo/post_migrate/20250204105409_add_index_on_last_synced_at_to_pages_deployment_registry.rb b/ee/db/geo/post_migrate/20250204105409_add_index_on_last_synced_at_to_pages_deployment_registry.rb
new file mode 100644
index 000000000000..ca5b322ac9e6
--- /dev/null
+++ b/ee/db/geo/post_migrate/20250204105409_add_index_on_last_synced_at_to_pages_deployment_registry.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnLastSyncedAtToPagesDeploymentRegistry < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.9'
+
+  TABLE = :pages_deployment_registry
+  INDEX = 'index_pages_deployment_registry_on_last_synced_at'
+
+  def up
+    add_concurrent_index TABLE, :last_synced_at, name: INDEX
+  end
+
+  def down
+    remove_concurrent_index_by_name TABLE, INDEX
+  end
+end
diff --git a/ee/db/geo/post_migrate/20250204105535_add_index_on_last_synced_at_to_pipeline_artifact_registry.rb b/ee/db/geo/post_migrate/20250204105535_add_index_on_last_synced_at_to_pipeline_artifact_registry.rb
new file mode 100644
index 000000000000..444d3f48e0b2
--- /dev/null
+++ b/ee/db/geo/post_migrate/20250204105535_add_index_on_last_synced_at_to_pipeline_artifact_registry.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnLastSyncedAtToPipelineArtifactRegistry < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.9'
+
+  TABLE = :pipeline_artifact_registry
+  INDEX = 'index_pipeline_artifact_registry_on_last_synced_at'
+
+  def up
+    add_concurrent_index TABLE, :last_synced_at, name: INDEX
+  end
+
+  def down
+    remove_concurrent_index_by_name TABLE, INDEX
+  end
+end
diff --git a/ee/db/geo/post_migrate/20250204105647_add_index_on_last_synced_at_to_project_repository_registry.rb b/ee/db/geo/post_migrate/20250204105647_add_index_on_last_synced_at_to_project_repository_registry.rb
new file mode 100644
index 000000000000..685cad78ae14
--- /dev/null
+++ b/ee/db/geo/post_migrate/20250204105647_add_index_on_last_synced_at_to_project_repository_registry.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnLastSyncedAtToProjectRepositoryRegistry < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.9'
+
+  TABLE = :project_repository_registry
+  INDEX = 'index_project_repository_registry_on_last_synced_at'
+
+  def up
+    add_concurrent_index TABLE, :last_synced_at, name: INDEX
+  end
+
+  def down
+    remove_concurrent_index_by_name TABLE, INDEX
+  end
+end
diff --git a/ee/db/geo/post_migrate/20250204105751_add_index_on_last_synced_at_to_project_wiki_repository_registry.rb b/ee/db/geo/post_migrate/20250204105751_add_index_on_last_synced_at_to_project_wiki_repository_registry.rb
new file mode 100644
index 000000000000..f5c1590fa6d0
--- /dev/null
+++ b/ee/db/geo/post_migrate/20250204105751_add_index_on_last_synced_at_to_project_wiki_repository_registry.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnLastSyncedAtToProjectWikiRepositoryRegistry < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.9'
+
+  TABLE = :project_wiki_repository_registry
+  INDEX = 'index_project_wiki_repository_registry_on_last_synced_at'
+
+  def up
+    add_concurrent_index TABLE, :last_synced_at, name: INDEX
+  end
+
+  def down
+    remove_concurrent_index_by_name TABLE, INDEX
+  end
+end
diff --git a/ee/db/geo/post_migrate/20250204105847_add_index_on_last_synced_at_to_snippet_repository_registry.rb b/ee/db/geo/post_migrate/20250204105847_add_index_on_last_synced_at_to_snippet_repository_registry.rb
new file mode 100644
index 000000000000..720876e8c337
--- /dev/null
+++ b/ee/db/geo/post_migrate/20250204105847_add_index_on_last_synced_at_to_snippet_repository_registry.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnLastSyncedAtToSnippetRepositoryRegistry < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.9'
+
+  TABLE = :snippet_repository_registry
+  INDEX = 'index_snippet_repository_registry_on_last_synced_at'
+
+  def up
+    add_concurrent_index TABLE, :last_synced_at, name: INDEX
+  end
+
+  def down
+    remove_concurrent_index_by_name TABLE, INDEX
+  end
+end
diff --git a/ee/db/geo/post_migrate/20250204110014_add_index_on_last_synced_at_to_terraform_state_version_registry.rb b/ee/db/geo/post_migrate/20250204110014_add_index_on_last_synced_at_to_terraform_state_version_registry.rb
new file mode 100644
index 000000000000..a79e3954196c
--- /dev/null
+++ b/ee/db/geo/post_migrate/20250204110014_add_index_on_last_synced_at_to_terraform_state_version_registry.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnLastSyncedAtToTerraformStateVersionRegistry < Gitlab::Database::Migration[2.2]
+  disable_ddl_transaction!
+
+  milestone '17.9'
+
+  TABLE = :terraform_state_version_registry
+  INDEX = 'index_terraform_state_version_registry_on_last_synced_at'
+
+  def up
+    add_concurrent_index TABLE, :last_synced_at, name: INDEX
+  end
+
+  def down
+    remove_concurrent_index_by_name TABLE, INDEX
+  end
+end
diff --git a/ee/db/geo/schema_migrations/20250130133254 b/ee/db/geo/schema_migrations/20250130133254
new file mode 100644
index 000000000000..e9da42a74366
--- /dev/null
+++ b/ee/db/geo/schema_migrations/20250130133254
@@ -0,0 +1 @@
+32f16fb71228b1c06637b779c97a4b4fd571e4a465fd59e671e5ebe2fe8b8569
\ No newline at end of file
diff --git a/ee/db/geo/schema_migrations/20250130151633 b/ee/db/geo/schema_migrations/20250130151633
new file mode 100644
index 000000000000..9075d250fa7e
--- /dev/null
+++ b/ee/db/geo/schema_migrations/20250130151633
@@ -0,0 +1 @@
+fe2ed7bcab164d25733e4308c8fb819ea2db40445a2819b7f8c5190790192a44
\ No newline at end of file
diff --git a/ee/db/geo/schema_migrations/20250130152121 b/ee/db/geo/schema_migrations/20250130152121
new file mode 100644
index 000000000000..ae2001a632d3
--- /dev/null
+++ b/ee/db/geo/schema_migrations/20250130152121
@@ -0,0 +1 @@
+3d757f74e4b8b11bf07863d3b51a395eb44f1723a452f4b6134a9991e069dcaa
\ No newline at end of file
diff --git a/ee/db/geo/schema_migrations/20250130152341 b/ee/db/geo/schema_migrations/20250130152341
new file mode 100644
index 000000000000..eaadb2d3419e
--- /dev/null
+++ b/ee/db/geo/schema_migrations/20250130152341
@@ -0,0 +1 @@
+676308ec96b6bc44ba67641559c722c5e84484e9a435160a351fe437b04e8190
\ No newline at end of file
diff --git a/ee/db/geo/schema_migrations/20250130152714 b/ee/db/geo/schema_migrations/20250130152714
new file mode 100644
index 000000000000..fce13c57ccfe
--- /dev/null
+++ b/ee/db/geo/schema_migrations/20250130152714
@@ -0,0 +1 @@
+996cfddc3780d73dd08b63aa279b4910334214f5279520d0e7939a8c856a58f2
\ No newline at end of file
diff --git a/ee/db/geo/schema_migrations/20250130152854 b/ee/db/geo/schema_migrations/20250130152854
new file mode 100644
index 000000000000..649f33ab721c
--- /dev/null
+++ b/ee/db/geo/schema_migrations/20250130152854
@@ -0,0 +1 @@
+7970d4ea9e34f31a7b88f7e69011356342d59d881d45cafbc00f4190bb5b022f
\ No newline at end of file
diff --git a/ee/db/geo/schema_migrations/20250130162025 b/ee/db/geo/schema_migrations/20250130162025
new file mode 100644
index 000000000000..05f2d50ea385
--- /dev/null
+++ b/ee/db/geo/schema_migrations/20250130162025
@@ -0,0 +1 @@
+f1c48b8c654147645d413ee6dbb54b1efdd643d8ac6d22ccbed886af71f04076
\ No newline at end of file
diff --git a/ee/db/geo/schema_migrations/20250130162149 b/ee/db/geo/schema_migrations/20250130162149
new file mode 100644
index 000000000000..8a9ab09bc221
--- /dev/null
+++ b/ee/db/geo/schema_migrations/20250130162149
@@ -0,0 +1 @@
+896be5857c56f47c3880944baafb938a8b99df0998dab586c386756a9e6e5920
\ No newline at end of file
diff --git a/ee/db/geo/schema_migrations/20250130162305 b/ee/db/geo/schema_migrations/20250130162305
new file mode 100644
index 000000000000..4e88d26883d5
--- /dev/null
+++ b/ee/db/geo/schema_migrations/20250130162305
@@ -0,0 +1 @@
+1a487a54434f456b45ddfec8860e5c4b9bd45835b2b61b7fec5d67f87e4d18b4
\ No newline at end of file
diff --git a/ee/db/geo/schema_migrations/20250130162439 b/ee/db/geo/schema_migrations/20250130162439
new file mode 100644
index 000000000000..365bde999a70
--- /dev/null
+++ b/ee/db/geo/schema_migrations/20250130162439
@@ -0,0 +1 @@
+32bba88c515ed6df493c8e113324fd0da64f794678234e424efb51982374ffc4
\ No newline at end of file
diff --git a/ee/db/geo/schema_migrations/20250130162544 b/ee/db/geo/schema_migrations/20250130162544
new file mode 100644
index 000000000000..42f5aa43b51f
--- /dev/null
+++ b/ee/db/geo/schema_migrations/20250130162544
@@ -0,0 +1 @@
+e3b845cf1694e49c9be85c42fcb08fdedde91615eaa5e81574b791d2a547e9a8
\ No newline at end of file
diff --git a/ee/db/geo/schema_migrations/20250130162644 b/ee/db/geo/schema_migrations/20250130162644
new file mode 100644
index 000000000000..02204f011361
--- /dev/null
+++ b/ee/db/geo/schema_migrations/20250130162644
@@ -0,0 +1 @@
+118bb8f8fd67249f27f2a9cfd42422f412a9a4548c0c04c8407dbec3b76800a1
\ No newline at end of file
diff --git a/ee/db/geo/schema_migrations/20250130162758 b/ee/db/geo/schema_migrations/20250130162758
new file mode 100644
index 000000000000..f132d1a1d9bf
--- /dev/null
+++ b/ee/db/geo/schema_migrations/20250130162758
@@ -0,0 +1 @@
+7e74bba3c26b4cb66e5958a57ca7141bd5684b0457b215a3328fbff2affb9d05
\ No newline at end of file
diff --git a/ee/db/geo/schema_migrations/20250130162916 b/ee/db/geo/schema_migrations/20250130162916
new file mode 100644
index 000000000000..4fc65155ca2b
--- /dev/null
+++ b/ee/db/geo/schema_migrations/20250130162916
@@ -0,0 +1 @@
+0c360eb4539558d767e49ebb19602d06e6cf4c5dd4170c58b78a9ef47f6120fb
\ No newline at end of file
diff --git a/ee/db/geo/schema_migrations/20250130163019 b/ee/db/geo/schema_migrations/20250130163019
new file mode 100644
index 000000000000..a7a630bf6134
--- /dev/null
+++ b/ee/db/geo/schema_migrations/20250130163019
@@ -0,0 +1 @@
+c737d10cf8244070db739811bfc71d8b6c54fa255b146523749ea4206e0e5724
\ No newline at end of file
diff --git a/ee/db/geo/schema_migrations/20250130163143 b/ee/db/geo/schema_migrations/20250130163143
new file mode 100644
index 000000000000..1c364f68b184
--- /dev/null
+++ b/ee/db/geo/schema_migrations/20250130163143
@@ -0,0 +1 @@
+a650bca15476073ac8195c2e38fbfefbf45d5b61ae2bf597ef9d9fed708a68cd
\ No newline at end of file
diff --git a/ee/db/geo/schema_migrations/20250130163310 b/ee/db/geo/schema_migrations/20250130163310
new file mode 100644
index 000000000000..0aba0e911bdd
--- /dev/null
+++ b/ee/db/geo/schema_migrations/20250130163310
@@ -0,0 +1 @@
+5096cbda295520043daabefca77fe7d1579a6522a0262168341483e3bf8c6d6e
\ No newline at end of file
diff --git a/ee/db/geo/schema_migrations/20250204103658 b/ee/db/geo/schema_migrations/20250204103658
new file mode 100644
index 000000000000..d044713b7ad2
--- /dev/null
+++ b/ee/db/geo/schema_migrations/20250204103658
@@ -0,0 +1 @@
+2b4301f5459082df59f62dfada3a8bb00f165ac5c8ae3976c0031fd1727451c4
\ No newline at end of file
diff --git a/ee/db/geo/schema_migrations/20250204103959 b/ee/db/geo/schema_migrations/20250204103959
new file mode 100644
index 000000000000..3e44b041572e
--- /dev/null
+++ b/ee/db/geo/schema_migrations/20250204103959
@@ -0,0 +1 @@
+86aa26f36f3fbdad60e83fba67d8c78ae4c021dccb3c14d01c2e890eb346e7c8
\ No newline at end of file
diff --git a/ee/db/geo/schema_migrations/20250204104245 b/ee/db/geo/schema_migrations/20250204104245
new file mode 100644
index 000000000000..5bc853adad7b
--- /dev/null
+++ b/ee/db/geo/schema_migrations/20250204104245
@@ -0,0 +1 @@
+7d1c76351e31d43bacd6efea645dbcc66a5f8859f6a9cdd47faf716b43096607
\ No newline at end of file
diff --git a/ee/db/geo/schema_migrations/20250204104353 b/ee/db/geo/schema_migrations/20250204104353
new file mode 100644
index 000000000000..015f56fa91aa
--- /dev/null
+++ b/ee/db/geo/schema_migrations/20250204104353
@@ -0,0 +1 @@
+320779168ae6628e5587b46d0b2a6c1c67c52c239f348539078fdb1b3e6f9df7
\ No newline at end of file
diff --git a/ee/db/geo/schema_migrations/20250204104518 b/ee/db/geo/schema_migrations/20250204104518
new file mode 100644
index 000000000000..446bc860a432
--- /dev/null
+++ b/ee/db/geo/schema_migrations/20250204104518
@@ -0,0 +1 @@
+5126a8587d007ad9a5473682a713557e00f2738fa3a9c90349c3f7b9b1927313
\ No newline at end of file
diff --git a/ee/db/geo/schema_migrations/20250204104633 b/ee/db/geo/schema_migrations/20250204104633
new file mode 100644
index 000000000000..cf5478b1d65a
--- /dev/null
+++ b/ee/db/geo/schema_migrations/20250204104633
@@ -0,0 +1 @@
+3a0516b5dd4793120e6998efab32b18d5305e116d4ce30aefdbbe3e915994e1a
\ No newline at end of file
diff --git a/ee/db/geo/schema_migrations/20250204104739 b/ee/db/geo/schema_migrations/20250204104739
new file mode 100644
index 000000000000..0fd5d538faa0
--- /dev/null
+++ b/ee/db/geo/schema_migrations/20250204104739
@@ -0,0 +1 @@
+313ece99dff026538f9fac044ee8331995ee0e95a221849a914c1fdc60e6a605
\ No newline at end of file
diff --git a/ee/db/geo/schema_migrations/20250204104900 b/ee/db/geo/schema_migrations/20250204104900
new file mode 100644
index 000000000000..f2bca9983f80
--- /dev/null
+++ b/ee/db/geo/schema_migrations/20250204104900
@@ -0,0 +1 @@
+59656008dabe160774605f35feea4d8096dc21170ec24fe1c8cd9851828e62d3
\ No newline at end of file
diff --git a/ee/db/geo/schema_migrations/20250204105011 b/ee/db/geo/schema_migrations/20250204105011
new file mode 100644
index 000000000000..b63ab2eeb549
--- /dev/null
+++ b/ee/db/geo/schema_migrations/20250204105011
@@ -0,0 +1 @@
+d39c18c15207c20cc6081abab2805b80ee10d7c1eea98858e3fe9ad31d5b32e1
\ No newline at end of file
diff --git a/ee/db/geo/schema_migrations/20250204105125 b/ee/db/geo/schema_migrations/20250204105125
new file mode 100644
index 000000000000..97f099f290c5
--- /dev/null
+++ b/ee/db/geo/schema_migrations/20250204105125
@@ -0,0 +1 @@
+4f82ca77f3d7739fab6dbfa8aac29757e103fe399f4ed088dfc7fb314ca129ca
\ No newline at end of file
diff --git a/ee/db/geo/schema_migrations/20250204105310 b/ee/db/geo/schema_migrations/20250204105310
new file mode 100644
index 000000000000..01091aad3197
--- /dev/null
+++ b/ee/db/geo/schema_migrations/20250204105310
@@ -0,0 +1 @@
+5ac82bbf9a293ee47bfa01c64a4be1bb68ca49c77a96f06125fc9c3198810f2e
\ No newline at end of file
diff --git a/ee/db/geo/schema_migrations/20250204105409 b/ee/db/geo/schema_migrations/20250204105409
new file mode 100644
index 000000000000..50c1abab7ad1
--- /dev/null
+++ b/ee/db/geo/schema_migrations/20250204105409
@@ -0,0 +1 @@
+4e62f9c9ee383e42c0175d20be185065c432db0b1dc81f2c3587f1fd815c2744
\ No newline at end of file
diff --git a/ee/db/geo/schema_migrations/20250204105535 b/ee/db/geo/schema_migrations/20250204105535
new file mode 100644
index 000000000000..7814ce8da2a9
--- /dev/null
+++ b/ee/db/geo/schema_migrations/20250204105535
@@ -0,0 +1 @@
+812460e5c289a574f09211bad327480bda302690b502dfe90aa1f1251f21c74b
\ No newline at end of file
diff --git a/ee/db/geo/schema_migrations/20250204105647 b/ee/db/geo/schema_migrations/20250204105647
new file mode 100644
index 000000000000..b1d24ed0df69
--- /dev/null
+++ b/ee/db/geo/schema_migrations/20250204105647
@@ -0,0 +1 @@
+f1c0633af75cf0146e95066d4b19fada6ca9bb2b56c3fb55cbfb512665a1e390
\ No newline at end of file
diff --git a/ee/db/geo/schema_migrations/20250204105751 b/ee/db/geo/schema_migrations/20250204105751
new file mode 100644
index 000000000000..1a1fdfeb8f83
--- /dev/null
+++ b/ee/db/geo/schema_migrations/20250204105751
@@ -0,0 +1 @@
+90037ba8115ff916ec6801ff5985964971a3d5f3101c13a7d77339943da075ea
\ No newline at end of file
diff --git a/ee/db/geo/schema_migrations/20250204105847 b/ee/db/geo/schema_migrations/20250204105847
new file mode 100644
index 000000000000..12b1f5552394
--- /dev/null
+++ b/ee/db/geo/schema_migrations/20250204105847
@@ -0,0 +1 @@
+2737073eddd52f316dbf5e639fc3fdcdd8f07e660f31c3b9ec318a26370fde9d
\ No newline at end of file
diff --git a/ee/db/geo/schema_migrations/20250204110014 b/ee/db/geo/schema_migrations/20250204110014
new file mode 100644
index 000000000000..327f0f74a36c
--- /dev/null
+++ b/ee/db/geo/schema_migrations/20250204110014
@@ -0,0 +1 @@
+b40b4338d276ee1f46c359cf7f1d594c122d8dd42727700b25cf1b97975fa6ee
\ No newline at end of file
diff --git a/ee/db/geo/structure.sql b/ee/db/geo/structure.sql
index 4dc632fc78a0..0836e642a00d 100644
--- a/ee/db/geo/structure.sql
+++ b/ee/db/geo/structure.sql
@@ -720,106 +720,174 @@ CREATE UNIQUE INDEX idx_project_wiki_repository_registry_project_wiki_repository
 
 CREATE UNIQUE INDEX index_ci_secure_file_registry_on_ci_secure_file_id ON ci_secure_file_registry USING btree (ci_secure_file_id);
 
+CREATE INDEX index_ci_secure_file_registry_on_last_synced_at ON ci_secure_file_registry USING btree (last_synced_at);
+
 CREATE INDEX index_ci_secure_file_registry_on_retry_at ON ci_secure_file_registry USING btree (retry_at);
 
 CREATE INDEX index_ci_secure_file_registry_on_state ON ci_secure_file_registry USING btree (state);
 
+CREATE INDEX index_ci_secure_file_registry_on_verified_at ON ci_secure_file_registry USING btree (verified_at);
+
+CREATE INDEX index_container_repository_registry_on_last_synced_at ON container_repository_registry USING btree (last_synced_at);
+
 CREATE INDEX index_container_repository_registry_on_retry_at ON container_repository_registry USING btree (retry_at);
 
 CREATE INDEX index_container_repository_registry_on_state ON container_repository_registry USING btree (state);
 
+CREATE INDEX index_container_repository_registry_on_verified_at ON container_repository_registry USING btree (verified_at);
+
 CREATE UNIQUE INDEX index_container_repository_registry_repository_id_unique ON container_repository_registry USING btree (container_repository_id);
 
+CREATE INDEX index_dependency_proxy_blob_registry_on_last_synced_at ON dependency_proxy_blob_registry USING btree (last_synced_at);
+
 CREATE INDEX index_dependency_proxy_blob_registry_on_retry_at ON dependency_proxy_blob_registry USING btree (retry_at);
 
 CREATE INDEX index_dependency_proxy_blob_registry_on_state ON dependency_proxy_blob_registry USING btree (state);
 
+CREATE INDEX index_dependency_proxy_blob_registry_on_verified_at ON dependency_proxy_blob_registry USING btree (verified_at);
+
+CREATE INDEX index_dependency_proxy_manifest_registry_on_last_synced_at ON dependency_proxy_manifest_registry USING btree (last_synced_at);
+
 CREATE INDEX index_dependency_proxy_manifest_registry_on_retry_at ON dependency_proxy_manifest_registry USING btree (retry_at);
 
 CREATE INDEX index_dependency_proxy_manifest_registry_on_state ON dependency_proxy_manifest_registry USING btree (state);
 
+CREATE INDEX index_dependency_proxy_manifest_registry_on_verified_at ON dependency_proxy_manifest_registry USING btree (verified_at);
+
+CREATE INDEX index_design_management_repository_registry_on_last_synced_at ON design_management_repository_registry USING btree (last_synced_at);
+
 CREATE INDEX index_design_management_repository_registry_on_retry_at ON design_management_repository_registry USING btree (retry_at);
 
 CREATE INDEX index_design_management_repository_registry_on_state ON design_management_repository_registry USING btree (state);
 
+CREATE INDEX index_design_management_repository_registry_on_verified_at ON design_management_repository_registry USING btree (verified_at);
+
 CREATE UNIQUE INDEX index_design_repo_registry_on_design_repo_id ON design_management_repository_registry USING btree (design_management_repository_id);
 
 CREATE INDEX index_file_registry_file_id ON file_registry USING btree (file_id);
 
+CREATE INDEX index_file_registry_on_last_synced_at ON file_registry USING btree (last_synced_at);
+
 CREATE INDEX index_file_registry_on_retry_at ON file_registry USING btree (retry_at);
 
+CREATE INDEX index_file_registry_on_verified_at ON file_registry USING btree (verified_at);
+
 CREATE INDEX index_file_registry_state ON file_registry USING btree (state);
 
 CREATE UNIQUE INDEX index_g_wiki_repository_registry_on_group_wiki_repository_id ON group_wiki_repository_registry USING btree (group_wiki_repository_id);
 
+CREATE INDEX index_group_wiki_repository_registry_on_last_synced_at ON group_wiki_repository_registry USING btree (last_synced_at);
+
 CREATE INDEX index_group_wiki_repository_registry_on_retry_at ON group_wiki_repository_registry USING btree (retry_at);
 
 CREATE INDEX index_group_wiki_repository_registry_on_state ON group_wiki_repository_registry USING btree (state);
 
+CREATE INDEX index_group_wiki_repository_registry_on_verified_at ON group_wiki_repository_registry USING btree (verified_at);
+
 CREATE INDEX index_job_artifact_registry_on_artifact_id ON job_artifact_registry USING btree (artifact_id);
 
+CREATE INDEX index_job_artifact_registry_on_last_synced_at ON job_artifact_registry USING btree (last_synced_at);
+
 CREATE INDEX index_job_artifact_registry_on_retry_at ON job_artifact_registry USING btree (retry_at);
 
+CREATE INDEX index_job_artifact_registry_on_verified_at ON job_artifact_registry USING btree (verified_at);
+
 CREATE INDEX index_job_artifact_registry_state ON job_artifact_registry USING btree (state);
 
+CREATE INDEX index_lfs_object_registry_on_last_synced_at ON lfs_object_registry USING btree (last_synced_at);
+
 CREATE UNIQUE INDEX index_lfs_object_registry_on_lfs_object_id ON lfs_object_registry USING btree (lfs_object_id);
 
 CREATE INDEX index_lfs_object_registry_on_retry_at ON lfs_object_registry USING btree (retry_at);
 
 CREATE INDEX index_lfs_object_registry_on_success ON lfs_object_registry USING btree (success);
 
+CREATE INDEX index_lfs_object_registry_on_verified_at ON lfs_object_registry USING btree (verified_at);
+
 CREATE UNIQUE INDEX index_manifest_registry_on_manifest_id ON dependency_proxy_manifest_registry USING btree (dependency_proxy_manifest_id);
 
+CREATE INDEX index_merge_request_diff_registry_on_last_synced_at ON merge_request_diff_registry USING btree (last_synced_at);
+
 CREATE UNIQUE INDEX index_merge_request_diff_registry_on_mr_diff_id ON merge_request_diff_registry USING btree (merge_request_diff_id);
 
 CREATE INDEX index_merge_request_diff_registry_on_retry_at ON merge_request_diff_registry USING btree (retry_at);
 
 CREATE INDEX index_merge_request_diff_registry_on_state ON merge_request_diff_registry USING btree (state);
 
+CREATE INDEX index_merge_request_diff_registry_on_verified_at ON merge_request_diff_registry USING btree (verified_at);
+
+CREATE INDEX index_package_file_registry_on_last_synced_at ON package_file_registry USING btree (last_synced_at);
+
 CREATE INDEX index_package_file_registry_on_repository_id ON package_file_registry USING btree (package_file_id);
 
 CREATE INDEX index_package_file_registry_on_retry_at ON package_file_registry USING btree (retry_at);
 
 CREATE INDEX index_package_file_registry_on_state ON package_file_registry USING btree (state);
 
+CREATE INDEX index_package_file_registry_on_verified_at ON package_file_registry USING btree (verified_at);
+
+CREATE INDEX index_pages_deployment_registry_on_last_synced_at ON pages_deployment_registry USING btree (last_synced_at);
+
 CREATE UNIQUE INDEX index_pages_deployment_registry_on_pages_deployment_id ON pages_deployment_registry USING btree (pages_deployment_id);
 
 CREATE INDEX index_pages_deployment_registry_on_retry_at ON pages_deployment_registry USING btree (retry_at);
 
 CREATE INDEX index_pages_deployment_registry_on_state ON pages_deployment_registry USING btree (state);
 
+CREATE INDEX index_pages_deployment_registry_on_verified_at ON pages_deployment_registry USING btree (verified_at);
+
+CREATE INDEX index_pipeline_artifact_registry_on_last_synced_at ON pipeline_artifact_registry USING btree (last_synced_at);
+
 CREATE UNIQUE INDEX index_pipeline_artifact_registry_on_pipeline_artifact_id ON pipeline_artifact_registry USING btree (pipeline_artifact_id);
 
 CREATE INDEX index_pipeline_artifact_registry_on_retry_at ON pipeline_artifact_registry USING btree (retry_at);
 
 CREATE INDEX index_pipeline_artifact_registry_on_state ON pipeline_artifact_registry USING btree (state);
 
+CREATE INDEX index_pipeline_artifact_registry_on_verified_at ON pipeline_artifact_registry USING btree (verified_at);
+
+CREATE INDEX index_project_repository_registry_on_last_synced_at ON project_repository_registry USING btree (last_synced_at);
+
 CREATE UNIQUE INDEX index_project_repository_registry_on_project_id ON project_repository_registry USING btree (project_id);
 
 CREATE INDEX index_project_repository_registry_on_retry_at ON project_repository_registry USING btree (retry_at);
 
 CREATE INDEX index_project_repository_registry_on_state ON project_repository_registry USING btree (state);
 
+CREATE INDEX index_project_repository_registry_on_verified_at ON project_repository_registry USING btree (verified_at);
+
+CREATE INDEX index_project_wiki_repository_registry_on_last_synced_at ON project_wiki_repository_registry USING btree (last_synced_at);
+
 CREATE UNIQUE INDEX index_project_wiki_repository_registry_on_project_id ON project_wiki_repository_registry USING btree (project_id);
 
 CREATE INDEX index_project_wiki_repository_registry_on_retry_at ON project_wiki_repository_registry USING btree (retry_at);
 
 CREATE INDEX index_project_wiki_repository_registry_on_state ON project_wiki_repository_registry USING btree (state);
 
+CREATE INDEX index_project_wiki_repository_registry_on_verified_at ON project_wiki_repository_registry USING btree (verified_at);
+
+CREATE INDEX index_snippet_repository_registry_on_last_synced_at ON snippet_repository_registry USING btree (last_synced_at);
+
 CREATE INDEX index_snippet_repository_registry_on_retry_at ON snippet_repository_registry USING btree (retry_at);
 
 CREATE UNIQUE INDEX index_snippet_repository_registry_on_snippet_repository_id ON snippet_repository_registry USING btree (snippet_repository_id);
 
 CREATE INDEX index_snippet_repository_registry_on_state ON snippet_repository_registry USING btree (state);
 
+CREATE INDEX index_snippet_repository_registry_on_verified_at ON snippet_repository_registry USING btree (verified_at);
+
 CREATE INDEX index_state_in_lfs_objects ON lfs_object_registry USING btree (state);
 
+CREATE INDEX index_terraform_state_version_registry_on_last_synced_at ON terraform_state_version_registry USING btree (last_synced_at);
+
 CREATE INDEX index_terraform_state_version_registry_on_retry_at ON terraform_state_version_registry USING btree (retry_at);
 
 CREATE INDEX index_terraform_state_version_registry_on_state ON terraform_state_version_registry USING btree (state);
 
 CREATE UNIQUE INDEX index_terraform_state_version_registry_on_t_state_version_id ON terraform_state_version_registry USING btree (terraform_state_version_id);
 
+CREATE INDEX index_terraform_state_version_registry_on_verified_at ON terraform_state_version_registry USING btree (verified_at);
+
 CREATE UNIQUE INDEX index_tf_state_versions_registry_tf_state_versions_id_unique ON terraform_state_version_registry USING btree (terraform_state_version_id);
 
 CREATE INDEX job_artifact_registry_failed_verification ON job_artifact_registry USING btree (verification_retry_at NULLS FIRST) WHERE ((state = 2) AND (verification_state = 3));
-- 
GitLab