fixtures/old_schema.sql — current (legacy) database schema
fixtures/new_schema.sql — target schema
fixtures/test_data.db — SQLite database with legacy data
Write output/migrate_data.py that transforms fixtures/test_data.db from the old schema to the new schema (write the migrated database to output/migrated.db). The migrated database must:
Match the new schema exactly
Preserve all data correctly
Handle data quality issues to satisfy the new schema constraints
Then execute your migration so that output/migrated.db exists.
Also save a short write-up to output/migration_writeup.md describing each data-quality fix you applied.