mirror of
https://github.com/baptisteArno/typebot.io.git
synced 2026-06-05 21:04:43 +08:00
🧑💻 Exit prisma command if database url starts with "postgres://"
Closes #602
This commit is contained in:
parent
13ac46975d
commit
0ea30bc49b
@ -26,7 +26,7 @@ export const executePrismaCommand = (command: string, options?: Options) => {
|
||||
|
||||
if (!databaseUrl) {
|
||||
console.error('Could not find DATABASE_URL in environment')
|
||||
return
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
if (databaseUrl?.startsWith('mysql://')) {
|
||||
@ -38,6 +38,11 @@ export const executePrismaCommand = (command: string, options?: Options) => {
|
||||
console.log('Executing for PostgreSQL schema')
|
||||
executeCommand(`${command} --schema ${postgesqlSchemaPath}`)
|
||||
}
|
||||
|
||||
if (process.env.DATABASE_URL?.startsWith('postgres://')) {
|
||||
console.error('PostgreSQL `DATABASE_URL` should start with postgresql://')
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
const executeCommand = (command: string) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user