feat(db): add hardware seed script, db:seed command, and initial migration

- Create lib/db/seed.ts with idempotent hardware seeding
- Add db:seed script and fix db:* scripts to load .env.local via bun --env-file
- Generate initial Drizzle migration (0000_crazy_nick_fury)
- Apply migration and seed 3 hardware devices (steamdeck-oled, steamdeck-lcd, steam-machine)
This commit is contained in:
2026-04-25 11:53:10 +08:00
parent 50f737f686
commit 65d13933bf
5 changed files with 696 additions and 4 deletions
+5 -4
View File
@@ -7,10 +7,11 @@
"build": "next build",
"start": "next start",
"lint": "eslint",
"db:generate": "drizzle-kit generate",
"db:migrate": "drizzle-kit migrate",
"db:studio": "drizzle-kit studio",
"db:push": "drizzle-kit push"
"db:generate": "bun --env-file=.env.local drizzle-kit generate",
"db:migrate": "bun --env-file=.env.local drizzle-kit migrate",
"db:studio": "bun --env-file=.env.local drizzle-kit studio",
"db:push": "bun --env-file=.env.local drizzle-kit push",
"db:seed": "bun run lib/db/seed.ts"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.1036.0",