Set null not distinct in scanner request constraint

This commit is contained in:
2025-12-01 20:02:52 +01:00
parent b39fa4262d
commit 1e975ce238
3 changed files with 2 additions and 2 deletions

View File

@@ -20,5 +20,5 @@ create table scanner.requests(
status scanner.request_status not null default 'pending',
started_at timestamptz,
created_at timestamptz not null default now()::timestamptz,
constraint unique_kty unique(kind, title, year)
constraint unique_kty unique nulls not distinct (kind, title, year)
);

View File

@@ -20,6 +20,7 @@ class Request(Model, extra="allow"):
id: str
episodes: list[Guess.Episode]
class RequestRet(Model):
id: str
kind: Literal["episode", "movie"]

View File

@@ -13,4 +13,3 @@ def get_ready():
# child spans (`select 1` & db connection reset) was still logged,
# since i don't really wanna deal with it, let's just do that.
return {"status": "healthy"}