From 68c38f228dfad9894289493dcd7e4380b3589ee4 Mon Sep 17 00:00:00 2001 From: Sheen Capadngan Date: Tue, 8 Oct 2024 21:29:36 +0800 Subject: [PATCH] misc: moved to using env --- backend/src/db/manual-migrations/partition-audit-logs.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/backend/src/db/manual-migrations/partition-audit-logs.ts b/backend/src/db/manual-migrations/partition-audit-logs.ts index 1bdbb82f7..5c3913341 100644 --- a/backend/src/db/manual-migrations/partition-audit-logs.ts +++ b/backend/src/db/manual-migrations/partition-audit-logs.ts @@ -138,7 +138,7 @@ const up = async (knex: Knex): Promise => { }; export const executeMigration = async (url: string) => { - console.log("Executing migration to:", url); + console.log("Executing migration..."); const knex = kx({ client: "pg", connection: url @@ -149,9 +149,7 @@ export const executeMigration = async (url: string) => { }); }; -const args = process.argv.slice(2); -const dbUrl = args[0]; - +const dbUrl = process.env.AUDIT_LOGS_DB_URL; if (!dbUrl) { console.error("Please provide a DB connection URL as the first argument."); process.exit(1);