Reset database

I'm using Vercel Postgres and once, a while ago, I reset the database using some command like drizzle-kit push, maybe? IIRC, there was some sort of conflict and it was like, "Sorry, gotta start fresh." Which was fine with me. Sometimes I want to just reset the database but there doesn't seem to be an easy way to do it. How can I force a reset?
Solution:
There is nothing builtin :/ With postgres I do that: https://github.com/rphlmr/drizzle-vitest-pg/blob/main/test/setup.ts#L28-L32...
GitHub
drizzle-vitest-pg/test/setup.ts at main · rphlmr/drizzle-vitest-pg
How to use Drizzle & PGLite with Vitest. Contribute to rphlmr/drizzle-vitest-pg development by creating an account on GitHub.
Jump to solution
2 Replies
Solution
rphlmr ⚡
rphlmr ⚡5mo ago
There is nothing builtin :/ With postgres I do that: https://github.com/rphlmr/drizzle-vitest-pg/blob/main/test/setup.ts#L28-L32
GitHub
drizzle-vitest-pg/test/setup.ts at main · rphlmr/drizzle-vitest-pg
How to use Drizzle & PGLite with Vitest. Contribute to rphlmr/drizzle-vitest-pg development by creating an account on GitHub.
rphlmr ⚡
rphlmr ⚡5mo ago
The 3rd query removes the drizzle schema where your migrations are. Check against your own config to adapt.
Want results from more Discord servers?
Add your server