From a37bf374b23a5760f9cfc56e68fda3d624cfe94f Mon Sep 17 00:00:00 2001 From: Aman Varshney Date: Sun, 29 Jun 2025 19:13:05 +0530 Subject: [PATCH] include --database sqlite flag when d1 is selected --- .../src/app/(home)/_components/stack-builder.tsx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/apps/web/src/app/(home)/_components/stack-builder.tsx b/apps/web/src/app/(home)/_components/stack-builder.tsx index fe31a6b..899c224 100644 --- a/apps/web/src/app/(home)/_components/stack-builder.tsx +++ b/apps/web/src/app/(home)/_components/stack-builder.tsx @@ -859,7 +859,20 @@ const generateCommand = (stackState: StackState): string => { if (!checkDefault("api", stackState.api)) { flags.push(`--api ${stackState.api}`); } - if (!checkDefault("database", stackState.database)) { + + const requiresExplicitDatabase = [ + "d1", + "turso", + "neon", + "supabase", + "prisma-postgres", + "mongodb-atlas", + ].includes(stackState.dbSetup); + + if ( + !checkDefault("database", stackState.database) || + requiresExplicitDatabase + ) { flags.push(`--database ${stackState.database}`); } if (!checkDefault("orm", stackState.orm)) {