From 00e31f399e8e0fa7bf724adec6b18afa0693c82e Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Wed, 4 Feb 2026 23:33:17 -0600 Subject: [PATCH] fix(db): update deprecation warning for legacy database credentials - Added a condition to display the deprecation warning for legacy database credentials only in non-test environments. - This change prevents unnecessary warnings during testing, improving the developer experience. --- packages/server/src/db/constants.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/server/src/db/constants.ts b/packages/server/src/db/constants.ts index e5172740b..c4396726e 100644 --- a/packages/server/src/db/constants.ts +++ b/packages/server/src/db/constants.ts @@ -26,7 +26,8 @@ if (DATABASE_URL) { password, )}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}`; } else { - console.warn(` + if (process.env.NODE_ENV !== "test") { + console.warn(` ⚠️ [DEPRECATED DATABASE CONFIG] You are using the legacy hardcoded database credentials. This mode WILL BE REMOVED in a future release. @@ -34,6 +35,7 @@ if (DATABASE_URL) { Please migrate to Docker Secrets using POSTGRES_PASSWORD_FILE. Please execute this command in your server: curl -sSL https://dokploy.com/security/0.26.6.sh | bash `); + } if (process.env.NODE_ENV === "production") { dbUrl =