Skip to content

Commit

Permalink
Use execSync and prima command only
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoVictor committed Jun 14, 2024
1 parent 67adb2c commit 4ba0f2e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/migrations.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const { SecretsManager } = require("@aws-sdk/client-secrets-manager");
const { command } = require("./common/command");
// const { command } = require("./common/command");
const { execSync } = require("child_process");

module.exports.handler = async () => {
// const secretsManager = new SecretsManager({});
Expand All @@ -10,8 +11,6 @@ module.exports.handler = async () => {

// const DATABASE_URL = `postgresql://${username}:${password}@${process.env.DB_HOST}/coderunner?schema=public`;

const output = await command(
`DATABASE_URL="${process.env.DATABASE_URL}" && ./node_modules/.bin/prisma migrate deploy`
);
console.log(output);
const output = execSync("./node_modules/.bin/prisma migrate deploy");
console.log(output.toString());
};

0 comments on commit 4ba0f2e

Please sign in to comment.