Skip to content

Commit

Permalink
fix: change join to resolve in /api/v1/migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
kimtiago committed Sep 13, 2024
1 parent ff00311 commit ef9e7cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pages/api/v1/migrations/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import migrationRunner from "node-pg-migrate";
import { join } from "node:path";
import { resolve } from "node:path";
import database from "infra/database.js";

export default async function migrations(request, response) {
Expand All @@ -19,7 +19,7 @@ export default async function migrations(request, response) {
dbClient: dbClient,
databaseUrl: process.env.DATABASE_URL,
dryRun: true,
dir: join("infra", "migrations"),
dir: resolve("infra", "migrations"),
direction: "up",
verbose: true,
migrationsTable: "pgmigrations",
Expand Down

0 comments on commit ef9e7cd

Please sign in to comment.