mirror of
https://github.com/nestriness/nestri.git
synced 2025-12-12 08:45:38 +02:00
🐜 fix(db): Make primary_genre nullable
This commit is contained in:
1
packages/core/migrations/0014_thin_groot.sql
Normal file
1
packages/core/migrations/0014_thin_groot.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE "base_games" ALTER COLUMN "primary_genre" DROP NOT NULL;
|
||||||
1265
packages/core/migrations/meta/0014_snapshot.json
Normal file
1265
packages/core/migrations/meta/0014_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -99,6 +99,13 @@
|
|||||||
"when": 1746925065142,
|
"when": 1746925065142,
|
||||||
"tag": "0013_neat_colleen_wing",
|
"tag": "0013_neat_colleen_wing",
|
||||||
"breakpoints": true
|
"breakpoints": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idx": 14,
|
||||||
|
"version": "7",
|
||||||
|
"when": 1746926498096,
|
||||||
|
"tag": "0014_thin_groot",
|
||||||
|
"breakpoints": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -26,7 +26,7 @@ export const baseGamesTable = pgTable(
|
|||||||
releaseDate: utc("release_date").notNull(),
|
releaseDate: utc("release_date").notNull(),
|
||||||
size: json("size").$type<Size>().notNull(),
|
size: json("size").$type<Size>().notNull(),
|
||||||
description: text("description").notNull(),
|
description: text("description").notNull(),
|
||||||
primaryGenre: text("primary_genre").notNull(),
|
primaryGenre: text("primary_genre"),
|
||||||
controllerSupport: ControllerEnum("controller_support").notNull(),
|
controllerSupport: ControllerEnum("controller_support").notNull(),
|
||||||
compatibility: CompatibilityEnum("compatibility").notNull().default("unknown"),
|
compatibility: CompatibilityEnum("compatibility").notNull().default("unknown"),
|
||||||
// Score ranges from 0.0 to 5.0
|
// Score ranges from 0.0 to 5.0
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ export namespace BaseGame {
|
|||||||
description: "The aggregate user review score on Steam, represented as a percentage of positive reviews",
|
description: "The aggregate user review score on Steam, represented as a percentage of positive reviews",
|
||||||
example: Examples.BaseGame.score
|
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",
|
description: "The main category or genre that best represents the game's content and gameplay style",
|
||||||
example: Examples.BaseGame.primaryGenre
|
example: Examples.BaseGame.primaryGenre
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ const base_games = table("base_games")
|
|||||||
release_date: number(),
|
release_date: number(),
|
||||||
size: json<Size>(),
|
size: json<Size>(),
|
||||||
description: string(),
|
description: string(),
|
||||||
primary_genre: string(),
|
primary_genre: string().optional(),
|
||||||
controller_support: enumeration<"full" | "unknown">(),
|
controller_support: enumeration<"full" | "unknown">(),
|
||||||
compatibility: enumeration<"high" | "mid" | "low" | "unknown">(),
|
compatibility: enumeration<"high" | "mid" | "low" | "unknown">(),
|
||||||
score: number(),
|
score: number(),
|
||||||
|
|||||||
Reference in New Issue
Block a user