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.

Technology

MySQLMicrosoft AccessNode.jsPowerShell

More work

Other projects

ERPTextile processing mill · Live, in daily use

Textile Mill ERP

A complete production management system that follows fabric from greige receipt through printing, dyeing and post-processing to packing and dispatch, with lot-level traceability. It replaced paper, spreadsheets and a single-user Access database. I built and maintain all of it alone: 45 screens, a 79-table database, 31 API modules, tablet layouts for the production floor and an Android companion app.

React 19ViteNode.jsExpressMySQLSheetJSAndroid
AIBuilt into the Textile Mill ERP

ERP Assistant — Ask the System by Text or Voice

Staff ask in plain words — typed or spoken — things like "what is left to print on this lot?" and get the same figure the report shows. It runs reports, explains screens and opens forms pre-filled for a person to save. It only shows what the asking user is allowed to see, never writes data itself, and runs fully on the factory server, so business data never leaves the building.

Node.jsCustom NLU engineVoice inputPermission-aware tools
AIFactory production line

AI Machine-Safety Interlock

Cameras watch a production line and, when a person is somewhere unsafe, the machine near them is stopped through the PLC. One batched detection pass covers 15 cameras and controls two machines independently. Mask zones separate "outside the plant wall" from "allowed to stand here", and the design is fail-safe: when in doubt, stop.

PythonYOLOv8OpenCVRTSP camerasModbus · Delta PLC

Contact

Tell me the problem. I will show you the fix.

Have a similar problem in your business? Describe it and I will reply with how I would solve it.