feat(db): add slug column to games table

This commit is contained in:
2026-05-20 02:17:15 +08:00
parent e5f671a992
commit b835ac678f
4 changed files with 2453 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
ALTER TABLE "games" ADD COLUMN "slug" text;--> statement-breakpoint
ALTER TABLE "games" ADD CONSTRAINT "games_slug_unique" UNIQUE("slug");
File diff suppressed because it is too large Load Diff
+7
View File
@@ -183,6 +183,13 @@
"when": 1778921901471, "when": 1778921901471,
"tag": "0025_flowery_molten_man", "tag": "0025_flowery_molten_man",
"breakpoints": true "breakpoints": true
},
{
"idx": 26,
"version": "7",
"when": 1779214557250,
"tag": "0026_polite_drax",
"breakpoints": true
} }
] ]
} }
+1
View File
@@ -49,6 +49,7 @@ export const games = pgTable(
.$defaultFn(() => crypto.randomUUID()), .$defaultFn(() => crypto.randomUUID()),
steamAppId: integer("steam_app_id").unique(), steamAppId: integer("steam_app_id").unique(),
source: gameSourceEnum("source").default("steam").notNull(), source: gameSourceEnum("source").default("steam").notNull(),
slug: text("slug").unique(),
title: text("title").notNull(), title: text("title").notNull(),
description: text("description"), description: text("description"),
publisher: text("publisher"), publisher: text("publisher"),