Skip to content

Commit a37bf37

Browse files
include --database sqlite flag when d1 is selected
1 parent 3ae5ab9 commit a37bf37

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

apps/web/src/app/(home)/_components/stack-builder.tsx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,20 @@ const generateCommand = (stackState: StackState): string => {
859859
if (!checkDefault("api", stackState.api)) {
860860
flags.push(`--api ${stackState.api}`);
861861
}
862-
if (!checkDefault("database", stackState.database)) {
862+
863+
const requiresExplicitDatabase = [
864+
"d1",
865+
"turso",
866+
"neon",
867+
"supabase",
868+
"prisma-postgres",
869+
"mongodb-atlas",
870+
].includes(stackState.dbSetup);
871+
872+
if (
873+
!checkDefault("database", stackState.database) ||
874+
requiresExplicitDatabase
875+
) {
863876
flags.push(`--database ${stackState.database}`);
864877
}
865878
if (!checkDefault("orm", stackState.orm)) {

0 commit comments

Comments
 (0)