restoring root branch creates new root branch that can't be deleted
I had my main branch and a child branch. I restored the parent to match the child. It created a grandchild with name prefix main_old that I can't delete because it's considered a root branch. I can't delete the child (main-1) either because it has its own child (main_old).

11 Replies
stormy-gold•14mo ago
Hey! So after a restore operation, your old branch is preserved as a back up
Unfortunately, it's not currently possible to delete them since a backup branch is the parent of a restored branch, and you cannot delete a parent branch without first removing its child branches.
Support for deleting backup branches is expected in a future release.
In the meantime, if you're certain you no longer need a backup branch, you can free up its storage space by connecting to the branch and dropping its databases or tables
exotic-emerald•10mo ago
Any updates on this? This kind of feels like it defeats the purpose and puts all branches in a kind of deadlock. Makes me personally not want to use the feature, unless absolutely necessary of course. As a new user, I was also kind of expecting the parent to remain the same and the restored branch to be pointing to the original parent.
Let's say I have a Production branch, and I create a Staging branch as a child branch. If I then restore the Staging branch why is the new Staging branch now no longer a child of Production? Again does this not defeat the purpose?
You can always freely select what branch you wish to restore from so the Parent-Child relationship does not really mean anything anyway, aside from the quick "Restore from parent" function.
stormy-gold•10mo ago
I was also kind of expecting the parent to remain the same and the restored branch to be pointing to the original parent.Appreciate the feedback. This is something we plan on supporting eventually
exotic-emerald•10mo ago
Happy to hear, thanks for getting back to me
adverse-sapphire•10mo ago
Came here (discord) for exactly this same issue. It's my fault for not reading the docs I guess, but the existing behaviour doesn't feel desirable or intuitive.
stormy-gold•10mo ago
I appreciate you reaching out. This is something the product team is currently looking into improving
other-emerald•9mo ago
This issue makes the "Restore" feature unusable at the time sadly
stormy-gold•9mo ago
Hey! Do you mind sharing more details?
other-emerald•9mo ago
Sure, @Mahmoud, it's the same issue that @andreas and @Kelvin mentioned.
I used the branching system to create backups of my database that I could restore later. However, when I restore a backup branch, it makes the main branch a child of that backup. Since I can't delete the parent branch, I'm now stuck with 9 branches I can't remove. And because I'm on the free plan, which has a limit of 10 branches, I can't create any more backups.
On the pro plan, the issue is similar, but at least you can create up to 3,000 backups before getting permanently stuck (for now, at least).
rare-sapphire•7mo ago
any updates on this? we need this please
optimistic-gold•5mo ago
any updates????
one year later..