mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 13:27:46 +00:00
misc: moved to using env
This commit is contained in:
@@ -138,7 +138,7 @@ const up = async (knex: Knex): Promise<void> => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const executeMigration = async (url: string) => {
|
export const executeMigration = async (url: string) => {
|
||||||
console.log("Executing migration to:", url);
|
console.log("Executing migration...");
|
||||||
const knex = kx({
|
const knex = kx({
|
||||||
client: "pg",
|
client: "pg",
|
||||||
connection: url
|
connection: url
|
||||||
@@ -149,9 +149,7 @@ export const executeMigration = async (url: string) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const args = process.argv.slice(2);
|
const dbUrl = process.env.AUDIT_LOGS_DB_URL;
|
||||||
const dbUrl = args[0];
|
|
||||||
|
|
||||||
if (!dbUrl) {
|
if (!dbUrl) {
|
||||||
console.error("Please provide a DB connection URL as the first argument.");
|
console.error("Please provide a DB connection URL as the first argument.");
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user