remove all data from branch?
Whenever we push a commit to an open PR, we are kicking off a new preview Vercel deployment. At the same time we are running a seed script. The issue is that if a previous commit exists on that PR, we would be duplicating the data.
Is there a way to wipe the data so that the seed script basically refreshes the branch on every commit?
Thanks!
2 Replies
other-emeraldOP•2y ago
For now we added:
At the top of our seed script which only runs when VERCEL_ENV is preview. Works for us since our tables are all in the public schema...
sensitive-blue•2y ago
Oh yes, this'd work just fine. This was also what I suggested in https://discord.com/channels/1176467419317940276/1241319099968262164/1241328843671732234.
Another great solve, @juanvilladev!