21bd0f6227
`db:migrate` (and drizzle-kit's config default) resolved DATABASE_URL to `./parking.sqlite` relative to packages/db — a stray, half-empty leftover DB, not the real store at apps/server/parking.sqlite. Running `pnpm --filter @parking/db db:migrate` with no env therefore migrated the wrong file and failed on its broken state, while the real DB went untouched. Default DATABASE_URL to ../../apps/server/parking.sqlite in both the db:migrate script and drizzle.config.ts (an explicit DATABASE_URL still overrides). The stray packages/db/parking.sqlite was untracked + already gitignored (*.sqlite); deleted it from disk. Now `pnpm --filter @parking/db db:migrate` targets the appliance DB out of the box. Claude-Session: https://claude.ai/code/session_01Xcm6ikLgGoCxxHrxtjkk5V
37 lines
886 B
JSON
37 lines
886 B
JSON
{
|
|
"name": "@parking/db",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/index.d.ts",
|
|
"default": "./dist/index.js"
|
|
},
|
|
"./schema": {
|
|
"types": "./dist/schema.d.ts",
|
|
"default": "./dist/schema.js"
|
|
}
|
|
},
|
|
"main": "./dist/index.js",
|
|
"types": "./dist/index.d.ts",
|
|
"scripts": {
|
|
"build": "tsc -b",
|
|
"dev": "tsc -b --watch",
|
|
"typecheck": "tsc --noEmit",
|
|
"lint": "tsc --noEmit",
|
|
"db:generate": "drizzle-kit generate",
|
|
"db:migrate": "DATABASE_URL=\"${DATABASE_URL:-../../apps/server/parking.sqlite}\" drizzle-kit migrate"
|
|
},
|
|
"dependencies": {
|
|
"@parking/shared": "workspace:*",
|
|
"better-sqlite3": "12.10.1",
|
|
"drizzle-orm": "0.45.2"
|
|
},
|
|
"devDependencies": {
|
|
"@types/better-sqlite3": "7.6.13",
|
|
"drizzle-kit": "0.31.10",
|
|
"typescript": "6.0.3"
|
|
}
|
|
}
|