fix prisma postgres setup prompt

This commit is contained in:
Aman Varshney
2025-04-04 08:12:08 +05:30
parent d1a5feaba9
commit b170dfcf82
3 changed files with 13 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
---
"create-better-t-stack": patch
---
fix prisma postgres setup prompt

View File

@@ -55,6 +55,7 @@ export async function createProject(options: ProjectConfig): Promise<string> {
options.orm,
options.packageManager,
options.turso ?? options.database === "sqlite",
options.prismaPostgres,
);
await setupAuthTemplate(

View File

@@ -16,7 +16,8 @@ export async function setupDatabase(
databaseType: ProjectDatabase,
orm: ProjectOrm,
packageManager: ProjectPackageManager,
setupTursoDb = true,
setupTursoDb: boolean,
setupPrismaPostgresDb: boolean,
): Promise<void> {
const s = spinner();
const serverDir = path.join(projectDir, "apps/server");
@@ -59,7 +60,11 @@ export async function setupDatabase(
projectDir: serverDir,
});
if (databaseType === "postgres" && orm === "prisma") {
if (
databaseType === "postgres" &&
orm === "prisma" &&
setupPrismaPostgresDb
) {
await setupPrismaPostgres(projectDir, true, packageManager);
}
}