where: "repository_retry_count IS NULL AND last_repository_successful_sync_at IS NOT NULL AND (resync_repository = 't' OR repository_verification_checksum_sha IS NULL AND last_repository_verification_failure IS NULL)",
# These are extensions that must be enabled in order to support this database
# These are extensions that must be enabled in order to support this database
enable_extension"plpgsql"
enable_extension"plpgsql"
...
@@ -84,6 +84,8 @@ ActiveRecord::Schema.define(version: 20180802215313) do
...
@@ -84,6 +84,8 @@ ActiveRecord::Schema.define(version: 20180802215313) do
t.integer"wiki_verification_retry_count"
t.integer"wiki_verification_retry_count"
end
end
add_index"project_registry",["last_repository_successful_sync_at"],name: "idx_project_registry_synced_repositories_partial",where: "((resync_repository = false) AND (repository_retry_count IS NULL) AND (repository_verification_checksum_sha IS NOT NULL))",using: :btree
add_index"project_registry",["last_repository_successful_sync_at"],name: "idx_unsynced_repositories_partial",where: "(last_repository_successful_sync_at IS NULL)",using: :btree
add_index"project_registry",["project_id"],name: "idx_project_registry_on_repo_checksums_and_failure_partial",where: "((repository_verification_checksum_sha IS NULL) AND (last_repository_verification_failure IS NULL))",using: :btree
add_index"project_registry",["project_id"],name: "idx_project_registry_on_repo_checksums_and_failure_partial",where: "((repository_verification_checksum_sha IS NULL) AND (last_repository_verification_failure IS NULL))",using: :btree
...
@@ -94,6 +96,8 @@ ActiveRecord::Schema.define(version: 20180802215313) do
...
@@ -94,6 +96,8 @@ ActiveRecord::Schema.define(version: 20180802215313) do
add_index"project_registry",["repository_retry_count"],name: "idx_project_registry_failed_repositories_partial",where: "((repository_retry_count > 0) OR (last_repository_verification_failure IS NOT NULL) OR repository_checksum_mismatch)",using: :btree
add_index"project_registry",["repository_retry_count"],name: "idx_project_registry_pending_repositories_partial",where: "((repository_retry_count IS NULL) AND (last_repository_successful_sync_at IS NOT NULL) AND ((resync_repository = true) OR ((repository_verification_checksum_sha IS NULL) AND (last_repository_verification_failure IS NULL))))",using: :btree
add_index"project_registry",["repository_verification_checksum_sha"],name: "idx_project_registry_on_repository_checksum_sha_partial",where: "(repository_verification_checksum_sha IS NULL)",using: :btree
add_index"project_registry",["repository_verification_checksum_sha"],name: "idx_project_registry_on_repository_checksum_sha_partial",where: "(repository_verification_checksum_sha IS NULL)",using: :btree