Skip to content

Commit

Permalink
hotfix: better readability for migrate-script
Browse files Browse the repository at this point in the history
  • Loading branch information
FilipHarald committed Oct 8, 2024
1 parent dc25ca1 commit 9df9fe9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions services/explorer-api/scripts/migrate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import { backOff } from "exponential-backoff";
import { dbCredentials } from "../src/environment.js";

const pool = new pg.Pool(dbCredentials);
const db = drizzle(pool);
const retries = 50;

async function printTableList(client: PoolClient) {
const res = await client.query(
Expand All @@ -17,10 +19,6 @@ async function printTableList(client: PoolClient) {
console.log("==============================");
}

const db = drizzle(pool);

const retries = 50;

async function runMigrations() {
console.log("🥸 Running migrations...");
console.log(`host: ${dbCredentials.host} port: ${dbCredentials.port} db: ${dbCredentials.database} user: ${dbCredentials.user}`);
Expand Down

0 comments on commit 9df9fe9

Please sign in to comment.