Workflows for staging and production with limitations of local dev environment.

Hi folks. I've been going back and forth on this and I'm at a loss. I've done my best to setup a local dev environment with the CLI so that I can test and develop locally before pushing to the remote db. But without parity between the local dev environment and the online production environment I keep running into issues. The big one is functions and webhooks.

I've tried working within my limitations and using what is available in the local dev env to create triggers and functions to replicate webhooks but the setup is brittle.

I've also tried setting up my functions and webhooks through the online/production dashboard and then run supabase db remote commit on a fresh local environment but the migration doesn't include the supabase_functions schema or any of the associated tables and functions.

So what would be a reasonable workflow to separate testing from production? I don't want to make changes to the production db while I'm testing. Would I create two projects online - one for production and another for testing? And if so, how can I push changes between the two?

Or, do I use the CLI and create custom functions to mimic the supabase functionality?
Was this page helpful?