From 19fb67e57adfd84d73a9875ba7a109fb59c28226 Mon Sep 17 00:00:00 2001 From: rharkor Date: Tue, 18 Jun 2024 08:42:14 +0200 Subject: [PATCH] fix: db setup --- packages/scripts/init/db-setup.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/scripts/init/db-setup.ts b/packages/scripts/init/db-setup.ts index bd2da2f8..dddbc0f5 100644 --- a/packages/scripts/init/db-setup.ts +++ b/packages/scripts/init/db-setup.ts @@ -5,6 +5,8 @@ import * as fs from "fs" import * as path from "path" +import { logger } from "@next-boilerplate/lib" + import { exec } from "./utils/cmd" import { getPath } from "./utils/path" @@ -34,13 +36,17 @@ export const dbSetup = async () => { cwd: appPath, successMessage: "Database migrated", name: "Migrating the database", - }).catch(() => {}) + }).catch(() => { + logger.error("Failed to migrate the database") + }) //? Prisma seed await exec("prisma db seed", { cwd: appPath, successMessage: "Database seeded", name: "Seeding the database", + }).catch(() => { + logger.error("Failed to seed the database") }) } }