Skip to content

Commit

Permalink
fix: db setup
Browse files Browse the repository at this point in the history
  • Loading branch information
rharkor committed Jun 18, 2024
1 parent bca376a commit 19fb67e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/scripts/init/db-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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")
})
}
}

0 comments on commit 19fb67e

Please sign in to comment.