From 8a3a382619bedd59908e8670b3931152510869a3 Mon Sep 17 00:00:00 2001 From: Zeke Gabrielse Date: Thu, 5 Dec 2024 15:46:36 -0600 Subject: [PATCH] fix content type indexes --- db/migrate/20241113134529_create_release_descriptors.rb | 2 +- ...41114163421_add_content_attributes_to_release_manifests.rb | 2 +- db/schema.rb | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/db/migrate/20241113134529_create_release_descriptors.rb b/db/migrate/20241113134529_create_release_descriptors.rb index 5302f9f7f..caa071a72 100644 --- a/db/migrate/20241113134529_create_release_descriptors.rb +++ b/db/migrate/20241113134529_create_release_descriptors.rb @@ -20,7 +20,7 @@ def change t.index %i[release_artifact_id] t.index %i[content_path release_artifact_id], unique: true t.index %i[content_digest release_artifact_id], unique: true - t.index %i[content_type release_artifact_id] + t.index %i[content_type] end end end diff --git a/db/migrate/20241114163421_add_content_attributes_to_release_manifests.rb b/db/migrate/20241114163421_add_content_attributes_to_release_manifests.rb index f2de31234..4410a27bf 100644 --- a/db/migrate/20241114163421_add_content_attributes_to_release_manifests.rb +++ b/db/migrate/20241114163421_add_content_attributes_to_release_manifests.rb @@ -15,7 +15,7 @@ def change algorithm: :concurrently, unique: true - add_index :release_manifests, %i[content_type release_artifact_id], + add_index :release_manifests, :content_type, algorithm: :concurrently end end diff --git a/db/schema.rb b/db/schema.rb index 8fa18868f..98f3aa6a4 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -549,7 +549,7 @@ t.index ["account_id", "created_at"], name: "index_release_descriptors_on_account_id_and_created_at", order: { created_at: :desc } t.index ["content_digest", "release_artifact_id"], name: "idx_on_content_digest_release_artifact_id_ca13eb81a4", unique: true t.index ["content_path", "release_artifact_id"], name: "idx_on_content_path_release_artifact_id_7ec9f722af", unique: true - t.index ["content_type", "release_artifact_id"], name: "idx_on_content_type_release_artifact_id_039cc326e1" + t.index ["content_type"], name: "index_release_descriptors_on_content_type" t.index ["environment_id"], name: "index_release_descriptors_on_environment_id" t.index ["release_artifact_id"], name: "index_release_descriptors_on_release_artifact_id" t.index ["release_id"], name: "index_release_descriptors_on_release_id" @@ -618,7 +618,7 @@ t.index ["account_id", "created_at"], name: "index_release_manifests_on_account_id_and_created_at", order: { created_at: :desc } t.index ["content_digest", "release_artifact_id"], name: "idx_on_content_digest_release_artifact_id_cba1f00640", unique: true t.index ["content_path", "release_artifact_id"], name: "idx_on_content_path_release_artifact_id_f77b8efd5b", unique: true - t.index ["content_type", "release_artifact_id"], name: "idx_on_content_type_release_artifact_id_f442b302f3" + t.index ["content_type"], name: "index_release_manifests_on_content_type" t.index ["environment_id"], name: "index_release_manifests_on_environment_id" t.index ["release_artifact_id"], name: "index_release_manifests_on_release_artifact_id" t.index ["release_id"], name: "index_release_manifests_on_release_id"