Aller au contenu
#0089
SqliteSnapshotsContainers

A database per branch, branched with the code

A junior dev opens a PR that touches the schema. Instead of pointing them at a shared dev database where their migration would block four other people's work, you spin a fresh container off a snapshot of prod. The container has prod's SQLite file copied to its own /hoody/databases/. The PR's preview environment hits its own DB.

They run the migration. They click around. They break things. The other branches don't notice. When the PR merges, the container goes away. The DB goes with it.

This used to be the moment teams adopted Neon or PlanetScale: for "branchable" databases. With Hoody, the container branches, and the database branches because it's a file inside the container. There's no separate branching system.

Your branch's database is a copy of prod's, isolated, idle-free, and gone when the PR merges.