fix: use partial index for status page customDomain
Replace the sparse unique index with a partial index so multiple status pages without a custom domain no longer collide on null values.
This commit is contained in:
1 parent
187c8eaba1
commit
0aef8b652f
3 files changed
+39
-9
No files matched your search
@@ -134,6 +134,15 @@ describe("StatusPageService", () => {
|
||||
|
||||
expect(repo.create).toHaveBeenCalledWith("user-1", "team-1", undefined, expect.objectContaining({ customDomain: "status.example.com" }));
|
||||
});
|
||||
|
||||
it("allows multiple status pages without a custom domain", async () => {
|
||||
const { service, repo } = createService(true);
|
||||
|
||||
await service.createStatusPage("user-1", "team-1", undefined, { companyName: "First" });
|
||||
await service.createStatusPage("user-1", "team-1", undefined, { companyName: "Second" });
|
||||
|
||||
expect(repo.create).toHaveBeenCalledTimes(2);
|
||||
});
|
||||
});
|
||||
|
||||
describe("getStatusPagesByTeamId", () => {
|
||||
|
||||
Reference in new issue
Block a user