diff --git a/rfd-model/migrations/2024-11-25-175556_fix-revision-idx/down.sql b/rfd-model/migrations/2024-11-25-175556_fix-revision-idx/down.sql new file mode 100644 index 0000000..70084a5 --- /dev/null +++ b/rfd-model/migrations/2024-11-25-175556_fix-revision-idx/down.sql @@ -0,0 +1,2 @@ +DROP INDEX rfd_revision_commit_sha_idx; +CREATE UNIQUE INDEX rfd_revision_commit_sha_idx ON rfd_revision (rfd_id, commit_sha); diff --git a/rfd-model/migrations/2024-11-25-175556_fix-revision-idx/up.sql b/rfd-model/migrations/2024-11-25-175556_fix-revision-idx/up.sql new file mode 100644 index 0000000..8e33afb --- /dev/null +++ b/rfd-model/migrations/2024-11-25-175556_fix-revision-idx/up.sql @@ -0,0 +1,2 @@ +DROP INDEX rfd_revision_commit_sha_idx; +CREATE UNIQUE INDEX rfd_revision_commit_sha_idx ON rfd_revision (rfd_id, commit_sha) WHERE deleted_at IS NULL;