diff --git a/src/migrations.js b/src/migrations.js index 06bf61d..a8552c1 100644 --- a/src/migrations.js +++ b/src/migrations.js @@ -5,7 +5,8 @@ module.exports.handler = async () => { const { username, password } = await secretManager.getSecret( process.env.CLUSTER_SECRET_ID ); - const DATABASE_URL = `postgresql://${username}:${password}@${process.env.CLUSTER_URL}/coderunner?schema=public`; + const pass = encodeURIComponent(password); + const DATABASE_URL = `postgresql://${username}:${pass}@${process.env.CLUSTER_URL}/coderunner?schema=public`; const output = execSync( `DATABASE_URL="${DATABASE_URL}" ./node_modules/.bin/prisma migrate deploy`