mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-23 01:14:31 +02:00
Migrations.apply() now wraps each migration function and its _sqlite_migrations tracking row in db.atomic(), so they commit together: a failing migration rolls back cleanly, is not recorded, and stays pending, eliminating the double-apply hazard where a partially-failed migration left committed side effects behind. Migrations that cannot run inside a transaction (VACUUM, journal mode changes, manual transaction management) can opt out by registering with @migrations(transactional=False). Also fixed the test fixtures which used db.query() for INSERT statements - query() is a lazy generator, so those inserts never actually executed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UnLnhsH25Nnv7LHhekUfPd |
||
|---|---|---|
| .. | ||
| _static/js | ||
| _templates | ||
| .gitignore | ||
| changelog.rst | ||
| cli-reference.rst | ||
| cli.rst | ||
| codespell-ignore-words.txt | ||
| conf.py | ||
| contributing.rst | ||
| index.rst | ||
| installation.rst | ||
| Makefile | ||
| migrations.rst | ||
| plugins.rst | ||
| python-api.rst | ||
| reference.rst | ||
| tutorial.ipynb | ||