FeatureFuel
171

Rollback ("down") Migrations

Source: supabase/supabase#11263 · opened by @itsmingjie
Hi all! I've been using Hasura for my company's codebase but am interested in learning more about how Supabase works.

I'm trying to set up migrations, and after following the guide included in the Supabase CLI [blog post]( I was able to get a forward migration working. But I'm curious whether there is a way perform a migration "rollback"? Use case: developer A and developer B are working on two sibling branches, so when merging their branches it might be helpful to roll back applied migrations to resolve potential conflicts.

Hasura generates an up.sql and down.sql for each migration, and you can run hasura migrate apply --down 2 or hasura migrate apply --up 1 to move your database schema forward or backward in time. Is there a similar implementation that I'm missing for Supabase?

Hasura doc for rolling back migrations:

No pledges yet. Be the first to back this.

Make a pledge

Pledge your monetary support if this feature is added.

$

Comments

No comments yet.

Replying to

Add a comment

What do you think about this feature request?


Similar requests