From 22a06b4209783de8188132c6d68889a20ebc38c4 Mon Sep 17 00:00:00 2001 From: npmrun <1549469775@qq.com> Date: Sat, 18 Apr 2026 03:41:02 +0800 Subject: [PATCH] refactor: update database URL handling and temporary working directory logic Enhance the environment configuration for the SQLite database by adjusting the handling of the DATABASE_URL to ensure correct file path resolution based on the NODE_ENV variable. Modify the temporary working directory logic to correctly set paths for both production and development environments, improving overall path management. --- packages/drizzle-pkg/database/sqlite/db.ts | 2 +- packages/drizzle-pkg/db.sqlite | Bin 53248 -> 53248 bytes packages/drizzle-pkg/env.ts | 14 ++++++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/packages/drizzle-pkg/database/sqlite/db.ts b/packages/drizzle-pkg/database/sqlite/db.ts index b53ba72..696fbb6 100644 --- a/packages/drizzle-pkg/database/sqlite/db.ts +++ b/packages/drizzle-pkg/database/sqlite/db.ts @@ -6,7 +6,7 @@ if (process.env.NODE_ENV === 'production') { import('drizzle-orm/better-sqlite3/migrator') } -const tempCwd = process.env.NODE_ENV === 'production' +const tempCwd = process.env.NODE_ENV !== 'production' ? path.resolve(process.cwd(), 'packages/drizzle-pkg') : process.cwd(); diff --git a/packages/drizzle-pkg/db.sqlite b/packages/drizzle-pkg/db.sqlite index 1490dad19eb63460e506bc76394746ac57f507ad..c20a0865d6931e1f7b6a9635a260a7848c191b16 100644 GIT binary patch delta 33 pcmZozz}&Ead4e<}(?l6(My8DkEA%&WH2jcXG{Ioe0)<5j3;@753|IgF delta 305 zcmZozz}&Ead4e<}>qHr6M%Il9EA*N8Pi_`e*w621%E%hZ$;xVGXk=!Qnv|rQmS}FO zYhs>ktZQj*YN=~#o|s}}VPIxtnV7~ncdx*b(~NUxvM8M9VgLdG1_u5cKx5AF8>usg zauQ<(T;HF~f(GyT1%ak8GjnqC0%=D6r40N_Hwy~P=1+}e