Improved error message when wasp build detects that SQLite is used (#226)

Improved error message when wasp build detects that SQLite is used.
This commit is contained in:
tolarianwiz 2021-05-11 16:34:32 +02:00 committed by GitHub
parent f399fa5076
commit 79bb1c7a82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,7 +71,7 @@ genPrismaSchema wasp = createTemplateFileDraft dstPath tmplSrcPath (Just templat
-- TODO: Report this error with some better mechanism, not `error`.
Wasp.Db.SQLite ->
if Wasp.getIsBuild wasp
then error "SQLite is not supported in production. Set db.system to smth else."
then error "SQLite (a default database) is not supported in production. To build your Wasp app for production, switch to a different database. Switching to PostgreSQL: https://wasp-lang.dev/docs/language/basic-elements/#migrating-from-sqlite-to-postgresql ."
else ("sqlite", "\"file:./dev.db\"")
entityToPslModelSchema :: Entity -> String