mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-12-06 06:36:25 +00:00
Set null not distinct in scanner request constraint
This commit is contained in:
@@ -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)
|
||||
);
|
||||
|
||||
@@ -20,6 +20,7 @@ class Request(Model, extra="allow"):
|
||||
id: str
|
||||
episodes: list[Guess.Episode]
|
||||
|
||||
|
||||
class RequestRet(Model):
|
||||
id: str
|
||||
kind: Literal["episode", "movie"]
|
||||
|
||||
@@ -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"}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user