Seed a database once, branch the live state, apply three competing schema migrations in parallel, compare outcomes. No more ‘reset the DB and reseed’ tax.
Use this file to discover all available pages before exploring further.
Schema migrations are the canonical example of a change you want to try three ways before committing to one. The tax is always the same: reset the database, reseed test data, apply migration, test. For every scenario.Vers removes the tax. Seed once, branch the live database, apply competing migrations against isolated copies, compare in parallel.
The expensive part of testing a migration isn’t the migration — it’s the base state the migration modifies. You want to test three different premium-features implementations against the same seeded database, and traditionally that means reseeding three times.With Vers you seed once, branch the live VM (which includes the SQLite file’s exact page layout, WAL state, and any in-memory buffers), then apply a different migration to each branch. Every branch sees the same starting data; each diverges only in the migration you run.
Each migration goes on its own branch. For genuine parallelism, open three terminals; for a linear read, just run them one after the other — the vers execute form is fine.
The inspect.sh helper you wrote in Step 2 is present in every branch — they inherit the parent’s filesystem at branch time. Run it on each:
vers execute migration-premium "/app/inspect.sh"vers execute migration-inventory "/app/inspect.sh"vers execute migration-analytics "/app/inspect.sh"
Each branch shows a different schema. Every branch still has the baseline users/products/orders data unchanged — only the migration’s additions diverge.
The risky change lives on its own branch. The parent migration branch is unaffected. This is the rollback story for free: every commit you take is a restoration point, every branch is an isolation boundary.
Seed expensive state once, branch at the decision point, diverge per scenario. Databases happen to be the cleanest example because the setup cost (schema + seed data) is visibly expensive, but the pattern is the same one as parallel scenario testing and agent swarms:
The setup prefix is paid once, at commit time
Every fork inherits the exact state — byte-identical, memory and filesystem both
Divergence only costs what it actually writes
Combine that with vers commit and you have a rollback primitive strong enough that “test three migrations and keep the best one” becomes one afternoon of work, not one sprint.