S
Supabase5d ago
zbxd

Best Practice for dev database

Hi there! I'm developing an app that will be deployed via a Vercel/Supabase/NextJS stack. So far, I've created a basic schema for my db and written a seed.ts script using Snaplet, which generates a seed.sql file that populates test data for all of my tables. This is neat, and offers a quick way to test my app locally, or even on Supabase preview branches, since I've integrated with Git and enabled automatic branching. However, what I really want is a functional dev database that contains real data pulled from the API provider I am using. I probably won't be working with huge volumes of data, so even a clone of the production database would be fine. I've read through many posts here and seen a few people with similar use cases, but it's still pretty unclear to me what the best development pattern for this is. Seems like traditionally, the suggestion is to create a fully separate project for the dev database. I guess that's fine, but does feel a little clunky given what I believe branching to be capable of. Do I want a persistent dev branch instead? If so, how would you go about mirroring data from prod? I've seen talk of pg_dump and some other, more obscure suggestions. What's my best bet here?
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?