🗃️ db: enforce season field constraint

This commit is contained in:
2026-04-07 12:00:00 +07:00
parent 697f28de60
commit baf7ba20b1
2 changed files with 12 additions and 2 deletions

View File

@ -0,0 +1,10 @@
/*
Warnings:
- Made the column `season` on table `medias` required. This step will fail if there are existing NULL values in that column.
- Made the column `yearReleased` on table `medias` required. This step will fail if there are existing NULL values in that column.
*/
-- AlterTable
ALTER TABLE "medias" ALTER COLUMN "season" SET NOT NULL,
ALTER COLUMN "yearReleased" SET NOT NULL;

View File

@ -36,8 +36,8 @@ model Media {
status String
startAiring DateTime?
endAiring DateTime?
season Season?
yearReleased Int? @db.SmallInt
season Season
yearReleased Int @db.SmallInt
synopsis String @db.Text
ageRating String
mediaType MediaType