mirror of
https://github.com/zoriya/Kyoo.git
synced 2026-05-22 07:02:27 -04:00
Add video migration & runtime field on shows
This commit is contained in:
@@ -3,7 +3,6 @@ import {
|
||||
check,
|
||||
date,
|
||||
integer,
|
||||
jsonb,
|
||||
primaryKey,
|
||||
smallint,
|
||||
text,
|
||||
@@ -55,6 +54,7 @@ export const shows = schema.table(
|
||||
kind: showKind().notNull(),
|
||||
genres: genres().array().notNull(),
|
||||
rating: smallint(),
|
||||
runtime: integer(),
|
||||
status: showStatus().notNull(),
|
||||
startAir: date({ mode: "date" }),
|
||||
endAir: date({ mode: "date" }),
|
||||
@@ -70,6 +70,7 @@ export const shows = schema.table(
|
||||
"ratingValid",
|
||||
sql`0 <= ${t.rating} && ${t.rating} <= 100`,
|
||||
),
|
||||
runtimeValid: check("runtimeValid", sql`0 <= ${t.runtime}`),
|
||||
}),
|
||||
);
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ export const Movie = t.Object({
|
||||
genres: t.Array(Genre),
|
||||
rating: t.Nullable(t.Number({ minimum: 0, maximum: 100 })),
|
||||
status: ShowStatus,
|
||||
runtime: t.Nullable(t.Number({ minimum: 0 })),
|
||||
|
||||
airDate: t.Nullable(t.Date()),
|
||||
originalLanguage: t.Nullable(t.String()),
|
||||
|
||||
Reference in New Issue
Block a user