include --database sqlite flag when d1 is selected

This commit is contained in:
Aman Varshney
2025-06-29 19:13:05 +05:30
parent 3ae5ab9782
commit a37bf374b2

View File

@@ -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)) {