# Migration from the old courier database

Do not import the old application files into this project.

Map old shipment rows into `shipments`, and map each historical tracking update into `shipment_events`.
Typical old fields such as tracking number, sender/recipient, origin, destination, status and current location have direct destinations in the new schema.

Before migration:
1. Back up the old database.
2. Normalize dates to `Y-m-d H:i:s`.
3. Deduplicate tracking numbers.
4. Validate email/phone fields.
5. Preserve old IDs in a temporary staging table if auditability is required.
6. Import shipments first, then events using the new shipment IDs.

The supplied ZIP is intentionally treated as untrusted application code; only business data should be migrated.
