mirror of
https://github.com/zoriya/Kyoo.git
synced 2026-05-24 16:12:31 -04:00
Add collection type in database
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { relations, sql } from "drizzle-orm";
|
||||
import {
|
||||
type AnyPgColumn,
|
||||
check,
|
||||
date,
|
||||
index,
|
||||
@@ -16,7 +17,11 @@ import { entries } from "./entries";
|
||||
import { seasons } from "./seasons";
|
||||
import { image, language, schema } from "./utils";
|
||||
|
||||
export const showKind = schema.enum("show_kind", ["serie", "movie"]);
|
||||
export const showKind = schema.enum("show_kind", [
|
||||
"serie",
|
||||
"movie",
|
||||
"collection",
|
||||
]);
|
||||
export const showStatus = schema.enum("show_status", [
|
||||
"unknown",
|
||||
"finished",
|
||||
@@ -78,6 +83,10 @@ export const shows = schema.table(
|
||||
endAir: date(),
|
||||
originalLanguage: language(),
|
||||
|
||||
collectionPk: integer().references((): AnyPgColumn => shows.pk, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
|
||||
externalId: externalid(),
|
||||
|
||||
createdAt: timestamp({ withTimezone: true, mode: "string" })
|
||||
|
||||
Reference in New Issue
Block a user