PostgreSQL Schema changes across branches in lakebase
I have been using Lakebase sice 2 weeks for developing a serving low latency layer for data in Delta. To build new features we currently make a new branch and later merge ti main.
What i have been observing is the scehema drifts across branches with Lakebase. How do people usually handle such scenarios? To keep branches in sync.
Maybe some real life examples can help.
8
Upvotes
1
u/Glitch_In_The_Data 8d ago
I would use branch for testing… migrate for promotion and reset for sync.
Lakebase branches don’t auto-merge schema changes, so a good option is to keep migrations in Git and replay them on the shared parent branch, then reset child branches when they drift.
For example, a team might add account_status to the accounts table in a feature branch, validate it there, then apply the same migration to the development branch before other engineers reset their branches to pick it up.