You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wasp should create the database before executing migration to prevent an error.
STR:
wasp new toodoo -t todo-ts
cd toodoo
wasp db migrate-dev
user@pc:/mnt/c/projects/wasptest/toodoo$ wasp db migrate-dev
🐝 --- Compiling wasp project... --------------------------------------------------
[ Wasp ] Starting npm install
[ Wasp ] Still installing npm dependencies!
[ Wasp ] Installation going great - we'll get there soon!
[ Wasp ] The installation is taking a while, but we'll get there!
[ Wasp ] Yup, still not done installing.
[ Wasp ] We're getting closer and closer, everything will be installed soon!
[ Wasp !] npm warn deprecated [email protected]: Use your platform's native atob() and btoa() methods instead
[ Wasp !] npm warn deprecated [email protected]: Use your platform's native DOMException instead
[ Wasp ] Still waiting for the installation to finish? You should! We got too far to give up now!
[ Wasp ] You've been waiting so patiently, just wait a little longer (for the installation to finish)...
[ Wasp ] Still installing npm dependencies!
[ Wasp ]
[ Wasp ] added 451 packages, and audited 453 packages in 1m
[ Wasp ]
[ Wasp ] 107 packages are looking for funding
[ Wasp ] run `npm fund` for details
[ Wasp ]
[ Wasp ] 2 low severity vulnerabilities
[ Wasp ]
[ Wasp ] To address all issues (including breaking changes), run:
[ Wasp ] npm audit fix --force
[ Wasp ]
[ Wasp ] Run `npm audit` for details.
[ Client ] Starting npm install
[ Server ] Starting npm install
[ Server ] Still installing npm dependencies!
[ Client ] Still installing npm dependencies!
[ Server ]
[ Server ] added 140 packages, and audited 141 packages in 13s
[ Server ]
[ Server ] 24 packages are looking for funding
[ Server ] run `npm fund` for details
[ Server ]
[ Server ] 3 high severity vulnerabilities
[ Server ]
[ Server ] To address all issues (including breaking changes), run:
[ Server ] npm audit fix --force
[ Server ]
[ Server ] Run `npm audit` for details.
[ Client ] Installation going great - we'll get there soon!
[ Client ]
[ Client ] added 77 packages, and audited 78 packages in 20s
[ Client ]
[ Client ] 11 packages are looking for funding
[ Client ] run `npm fund` for details
[ Client ]
[ Client ] found 0 vulnerabilities
✅ --- Successfully completed npm install. ----------------------------------------
🐝 --- Setting up database... -----------------------------------------------------
[ Db !] Error: P1003
[ Db !]
[ Db !] Database `dev.db` does not exist at `/mnt/c/projects/wasptest/toodoo/.wasp/out/db/./dev.db`.
[ Db !]
[ Db ] Environment variables loaded from .env
[ Db ] Prisma schema loaded from ../db/schema.prisma
[ Db ]
[ Db ] ✔ Generated Prisma Client (v5.19.1) to ./../../../node_modules/@prisma/client in 386ms
[ Db ]
✅ --- Database successfully set up. ----------------------------------------------
🐝 --- Building SDK... ------------------------------------------------------------
✅ --- SDK built successfully. ----------------------------------------------------
✅ --- Your wasp project has successfully compiled. -------------------------------
🐝 --- Starting database migration... ---------------------------------------------
Environment variables loaded from .env
Prisma schema loaded from ../db/schema.prisma
Datasource "db": SQLite database "dev.db" at "file:./dev.db"
Applying migration `20240216105711_initial`
The following migration(s) have been applied:
migrations/
└─ 20240216105711_initial/
└─ migration.sql
Your database is now in sync with your schema.
The text was updated successfully, but these errors were encountered:
This is a transitive error that happens when you use SQLite with a Wasp project and you are running the migrations for the first time. Wasp tries to execute something like
to check if migrations are needed. This command produces the error your mentioned - but that's okay, Wasp now knows that migrations will be necessary. As soon as Wasp runs initial migration command, the dev.db file is created and this error now resolved.
In other words, this is not an error when looking from Wasp's point of view but an information about the state of the migrations. We should potentially add an extra check if the dev.db exists and not execute the diff check so users don't see this transitive error. I'll leave this issue open for now until we agree on what do we want to do internally :)
Wasp should create the database before executing migration to prevent an error.
STR:
wasp new toodoo -t todo-ts cd toodoo wasp db migrate-dev
The text was updated successfully, but these errors were encountered: