vr-migrations 1.0.32 → 1.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/db.js +4 -1
- package/package.json +1 -1
package/dist/db.js
CHANGED
|
@@ -20,7 +20,9 @@ async function initializeDatabase(config) {
|
|
|
20
20
|
// Detect if we need SSL (Neon or production/staging)
|
|
21
21
|
const isNeon = config.DATABASE_URL?.includes("neon.tech") ||
|
|
22
22
|
config.DB_HOST?.includes("neon.tech");
|
|
23
|
-
const isProduction = config.NODE_ENV === "production" ||
|
|
23
|
+
const isProduction = config.NODE_ENV === "production" ||
|
|
24
|
+
config.NODE_ENV === "staging" ||
|
|
25
|
+
config.NODE_ENV === "dev";
|
|
24
26
|
const shouldUseSSL = isNeon || isProduction;
|
|
25
27
|
// Configure dialect options for SSL
|
|
26
28
|
const dialectOptions = {};
|
|
@@ -30,6 +32,7 @@ async function initializeDatabase(config) {
|
|
|
30
32
|
rejectUnauthorized: false,
|
|
31
33
|
};
|
|
32
34
|
console.log("🔒 SSL enabled for database connection");
|
|
35
|
+
console.log("connecting to DATABASE_URL:", process.env.DATABASE_URL);
|
|
33
36
|
}
|
|
34
37
|
_sequelize = new sequelize_1.Sequelize({
|
|
35
38
|
dialect: "postgres",
|