bc8dd062d5
scripts/migrate_legacy_data.py copies rows from the legacy locationRecorder.db / pooRecorder.db into the unified app DB's location / poo_records tables using ATTACH + INSERT OR IGNORE (idempotent via PK-conflict skip; explicit columns, never SELECT *). After copy it reconciles every source row against the target and raises / exits non-zero on any shortfall. Missing legacy files are a safe no-op (skipped); --dry-run writes nothing. Not part of the Alembic chain; run manually once at cut-over. Never deletes or overwrites any file. Validated end-to-end on copies of the real production DBs: dry-run reported 75103 location + 874 poo rows and wrote nothing; the real run copied all rows with reconciliation passing; a second run copied 0 (idempotent).