a0032ddd2d
- Add schema_version table; init_db detects a pre-M3/unknown DB (no version row, or settings table missing the value column) and rebuilds to the clean M3 schema, then stamps version 1 - _has_schema_version checks for a real row (empty table != versioned) - _reset_for_tests checkpoints WAL before close (Windows handle release) - TDD: test_schema_drift seeds the M2 settings shape, asserts rebuild + version Fixes live 500 'no such column: value' on the UAT host (stale M2 slab_db volume). Gates: check_requirements + check_coverage exit 0; pytest 14 passed.