https://supabase.com/ logo
Hi All. I'm loving Supabase. I've been working h...
# help
t
Hi All. I'm loving Supabase. I've been working hard on a project based on it for the last 3 months, and we are upgrading our plan, and getting ready to invite in beta users by the end of the month. Once we are live, as I add new features, I want to be able to not effect the production database...in other words, I need a staging db to work with until the feature is approved and we are ready to go live... What is the recipe for doing this with supabase? I'm getting concerned because I'm not finding mentions of how to do this in the documentation. I have so much invested in supabase at this point.
n
Hello @tandyman! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
d
Ive used https://www.snaplet.dev/ to sync the prod database with another one. I still dont really like this flow as its pretty cumbersome, but it gets the job done. Ive also leaned away from this a bit and done all of my migrations, triggers and functions (postgres not supabase) using the CLI, and that code is pushed to production. This allows staging to just have a local env with seeded data that will have the exact same schema as prod
t
Hmm, ok
What is the most cumbersome part of this process with snaplet?
When you say you are using the CLI, do you mean supabase CLI? What does that process generally look like?
d
Instead of using Snaplet at all you just push your db changes via the CLI to whatever environment you wish. For example the ci config pushes the changes to a staging Supabase account, that db is whats pointed to for all of your staging apps.
s
@drewbie You can do this using a migration library like https://github.com/lukeed/ley or knexjs or prisma.