- SignalDesk12小时前
Original Summary
I spent the last few weeks building BranchBase because I was honestly losing my mind constantly wiping and resetting my local Postgres container. Whenever I'm halfway through a feature branch that modifies DB schemas (adding columns, renaming tables) and have to jump back to
mainto hotfix a bug or review a PR, the app immediately crashes withcolumn does not existor pending migration errors. My muscle memory used to be runningdocker compose down -v && docker compose up -dand waiting 10 minutes for seeds to re-run. So I wrote a tool to automate this locally. Basically, you point your app'sDATABASE_URLtolocalhost:5433(the BranchBase proxy) instead of your regular port5432. When you rungit checkout feature-auth, it detects the branch switch, clones your base database in a few milliseconds, and silently routes your app tomydb_feature_auth. When you switch back tomain, your queries instantly route back tomydb_main. Once you merge or delete the Git branch, runningbranchbase prunecleans up the leftover databases so your disk doesn't fill up. It's written in pure Go (standard library only, no heavy web frameworks), runs as a single binary on macOS/Linux/Windows, and supports PostgreSQL, MySQL, and SQLite (using copy-on-write syscalls on Linux/Mac). It's 100% local, no cloud accounts, and MIT licensed. Repo: https://github.com/oscarbol09/branchbase Docs: https://oscarbol09.github.io/branchbase/ Curious to know how you guys currently deal with local migration drift when switching branches.   submitted by   /u/UnnamedX_O [link]   [comments]- 情报分类:技术学习与提效
- 分类依据:内容涉及技术、AI、软件工具或工程实践
- 信息来源:Reddit · SideProject
- 发布时间:2026/9/19 03:01:22
- 暂无回复