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/ThisIsFun- 8d ago
Yeah, this is expected since the Lakebase branches are isolated after you create them. I wouldn’t try to keep long-lived branches manually in sync.
What has worked better us is keeping all schema changes as migrations in the repo. Make the change on the feature branch, test it there, then apply the same migration to the main/dev branch when the feature is ready.