🐜 fix(db): Make primary_genre nullable

This commit is contained in:
Wanjohi
2025-05-11 04:23:05 +03:00
parent 82dfd6506d
commit 0cc9effdec
6 changed files with 1276 additions and 3 deletions

View File

@@ -26,7 +26,7 @@ export const baseGamesTable = pgTable(
releaseDate: utc("release_date").notNull(),
size: json("size").$type<Size>().notNull(),
description: text("description").notNull(),
primaryGenre: text("primary_genre").notNull(),
primaryGenre: text("primary_genre"),
controllerSupport: ControllerEnum("controller_support").notNull(),
compatibility: CompatibilityEnum("compatibility").notNull().default("unknown"),
// Score ranges from 0.0 to 5.0

View File

@@ -36,7 +36,7 @@ export namespace BaseGame {
description: "The aggregate user review score on Steam, represented as a percentage of positive reviews",
example: Examples.BaseGame.score
}),
primaryGenre: z.string().openapi({
primaryGenre: z.string().nullable().openapi({
description: "The main category or genre that best represents the game's content and gameplay style",
example: Examples.BaseGame.primaryGenre
}),