diff --git a/src/migrations.js b/src/migrations.js index 9aba3e0..8485d4f 100644 --- a/src/migrations.js +++ b/src/migrations.js @@ -7,17 +7,14 @@ module.exports.handler = async () => { SecretId: process.env.CLUSTER_SECRET_ID, }); const { username, password } = JSON.parse(secret.SecretString); - console.log({ username, password }); - - // const DATABASE_URL = `postgresql://${username}:${password}@${process.env.DB_HOST}/coderunner?schema=public`; - // postgresql://app_user:P`ynjD)-[vYa!R1_2P3)D!QR1Z=t,H@coderunner-dbcluster.cluster-cqcxtxjpaiia.us-east-1.rds.amazonaws.com:5432/coderunner?schema=public + const DATABASE_URL = `postgresql://${username}:${password}@${process.env.CLUSTER_URL}/coderunner?schema=public`; const { output, error } = spawnSync( "./node_modules/.bin/prisma migrate deploy", { shell: true, env: { - DATABASE_URL: process.env.DATABASE_URL, + DATABASE_URL, }, } );