mirror of
https://github.com/R0m1k3/CollectFlow.git
synced 2026-10-18 04:36:21 +02:00
feat: Introduce Drizzle ORM for database management and a script for initial schema setup.
This commit is contained in:
1 parent
69e2f9c325
commit
6046be50de
2 files changed
+6
-6
No files matched your search
+3
-3
@@ -34,10 +34,10 @@ export function getDb() {
|
||||
console.error("[DB] Error reading config file:", err);
|
||||
}
|
||||
|
||||
// IMPORTANT: Environment variable MUST take precedence in container environments
|
||||
if (process.env.DATABASE_URL) {
|
||||
// Use environment variable as fallback if no config is found
|
||||
if (!connectionString && process.env.DATABASE_URL) {
|
||||
connectionString = process.env.DATABASE_URL;
|
||||
console.log("[DB] Using environment variable (優先度高).");
|
||||
console.log("[DB] Using environment variable as fallback.");
|
||||
}
|
||||
|
||||
console.log("[DB] Initializing connection with:", maskUrl(connectionString));
|
||||
|
||||
Reference in new issue
Block a user