Skip to content

Commit

Permalink
chore: reroute migration
Browse files Browse the repository at this point in the history
  • Loading branch information
codebender828 committed Jul 11, 2024
1 parent 7e62ba8 commit 08f7ec8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions apps/api/db/credentials.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ export async function getDatabaseCredentials(): Promise<
host: dbhost,
};

// console.log("database credentials", credentials);

return credentials;
} else {
throw new Error("No secret string found");
Expand Down
4 changes: 3 additions & 1 deletion apps/api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ app.get("/hello/:name", (c) => {

app.get("/migrate", async () => {
const { db } = await createDatabaseConnection();
await migrate(db, { migrationsFolder: resolve(__dirname, "./drizzle") });
const migrationsDirectory = resolve(__dirname, "../db/drizzle");
console.log("debug: running migrations from: ", migrationsDirectory);
await migrate(db, { migrationsFolder: migrationsDirectory });
});

export const handler = handle(app);

0 comments on commit 08f7ec8

Please sign in to comment.