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
If I write a new migration, it is not applied to my live test databases, I must end the Vitest process and start again (in this case, this takes ~30s because of all the containers)
Suggested solution
Would be nice if we could add a new quick command to the watch menu, such as m for triggering migrations inside the databases
Alternative
We could setup a parallel watching process which runs the migrations every time the migrations folder changes, but that seems flaky
I personally don't like extending the watch commands API. If you want to do something custom, you can always create your own script and run it in the terminal. But for this specific use case, maybe we can add something like onWatcherRerun to the globalSetup:
exportdefault({ onWatcherRerun })=>{onWatcherRerun(async()=>{// do this before running tests})}
Clear and concise description of the problem
We use testcontainers to run our integration tests with a live PostgreSQL database, in 5 parallel workers
All these DBs must be migrated using Prisma before starting
vitest --watch
, we do this in our global setup:If I write a new migration, it is not applied to my live test databases, I must end the Vitest process and start again (in this case, this takes ~30s because of all the containers)
Suggested solution
Would be nice if we could add a new quick command to the watch menu, such as
m
for triggering migrations inside the databasesAlternative
We could setup a parallel watching process which runs the migrations every time the migrations folder changes, but that seems flaky
Perhaps related to #842
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: