mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
include --database sqlite flag when d1 is selected
This commit is contained in:
@@ -859,7 +859,20 @@ const generateCommand = (stackState: StackState): string => {
|
|||||||
if (!checkDefault("api", stackState.api)) {
|
if (!checkDefault("api", stackState.api)) {
|
||||||
flags.push(`--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}`);
|
flags.push(`--database ${stackState.database}`);
|
||||||
}
|
}
|
||||||
if (!checkDefault("orm", stackState.orm)) {
|
if (!checkDefault("orm", stackState.orm)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user