diff --git a/prisma/migrations/migration_lock.toml b/prisma/migrations/migration_lock.toml index 2a5a444..044d57c 100644 --- a/prisma/migrations/migration_lock.toml +++ b/prisma/migrations/migration_lock.toml @@ -1,3 +1,3 @@ # Please do not edit this file manually # It should be added in your version-control system (e.g., Git) -provider = "sqlite" +provider = "postgresql" diff --git a/scripts/setup-postgres.js b/scripts/setup-postgres.js index 0976e31..9623c37 100755 --- a/scripts/setup-postgres.js +++ b/scripts/setup-postgres.js @@ -9,6 +9,12 @@ const { execSync } = require('child_process'); const fs = require('fs'); 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() { try { const dbUrl = process.env.DATABASE_URL;