chore: switch database provider from SQLite to PostgreSQL
This commit is contained in:
@@ -1,3 +1,3 @@
|
|||||||
# Please do not edit this file manually
|
# Please do not edit this file manually
|
||||||
# It should be added in your version-control system (e.g., Git)
|
# It should be added in your version-control system (e.g., Git)
|
||||||
provider = "sqlite"
|
provider = "postgresql"
|
||||||
|
|||||||
@@ -9,6 +9,12 @@ const { execSync } = require('child_process');
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
|
// Load .env file if it exists
|
||||||
|
const envPath = path.resolve(__dirname, '..', '.env');
|
||||||
|
if (fs.existsSync(envPath)) {
|
||||||
|
require('dotenv').config({ path: envPath });
|
||||||
|
}
|
||||||
|
|
||||||
function checkPostgresConnection() {
|
function checkPostgresConnection() {
|
||||||
try {
|
try {
|
||||||
const dbUrl = process.env.DATABASE_URL;
|
const dbUrl = process.env.DATABASE_URL;
|
||||||
|
|||||||
Reference in New Issue
Block a user