ERP · Textile processing mill
Legacy Access to MySQL Migration
Scripted tooling that moved years of production history out of a Microsoft Access database into MySQL without losing a record — ending single-user file locking so every department can enter data at the same time. Includes repeatable merge scripts for the period when the old and new systems ran side by side.
The problem
Years of production history sat in one Microsoft Access file with 60 tables. A new system that started empty would have thrown that history away — and nobody trusts a system that has forgotten everything.
What broke, and how I fixed it
- Table names with spaces — quoted differently in Access and MySQL, so every query was written for both
- Foreign keys — a hand-written 39-table insert order, parents first
- Dates that were not dates — blanks and half-typed entries become empty values instead of killing the row
- One bad row in a batch — the batch is retried row by row and the exact broken row is logged
- Re-runs deleting user accounts — user tables are never touched
The result
A migration that can be run again and again and always lands in the same clean state. All historical records moved into MySQL, and every department can now enter data at the same time.