You know what kills most legacy modernization projects?
Itâs not the old technology. Itâs not the lack of budget. Itâs not even the âspaghetti codeâ everyone loves to complain about.
Itâs the 300-column database table.
And if youâve ever opened a production database and seen it - that sprawling employee_data table with nullable columns stretching into oblivion - you know exactly what Iâm talking about.
The Day I Realized The Real Problem
For years, I watched companies struggle with the same pattern. A new requirement comes in. The team has a choice: redesign the system properly, or just add another nullable column to the existing table.
Guess which one wins when thereâs deadline pressure?
Column_184. Column_185. Column_186.
Nobody redesigns. Nobody refactors. Everyone just adds and prays.
And slowly - so slowly you donât even notice - your system transforms from a database into an archaeological site. Layers upon layers of forgotten decisions, abandoned features, and business rules that nobody remembers implementing.
Itâs not one bloated system. Itâs actually dozens of different business processes that have been smooshed together into a single table because no one ever stopped to ask what they were actually trying to do.
The Hidden Truth Inside Your âEmployee Dataâ
Let me paint you a picture.
An employee_data table. 300 columns. Simple name - âemployee dataâ. Just employee names, IDs, basic info is what people tell me is in there.
So I ask: âWalk me through what this table actually does.â
And thatâs when it unravels.
Turns out that innocent âemployee_dataâ table isnât master data at all. Hidden inside are:
- Payroll and compensation processes
- Employee lifecycle management
- Organizational hierarchies
- Department budget allocation
- Performance review workflows
- And six other things nobody remembers
Itâs not messy architecture. Itâs process soup - a dozen critical business workflows boiled down into a single table that nobody fully understands anymore.
Someone named it âemployee_dataâ and everyone just assumed it was simple. But buried beneath those 300 columns are completely separate business domains, all chained together, all invisible.
The Question Everyone Asks (But Nobody Answers)
Everyone can diagnose this problem. Every consultant can point at your schema and say, âWow, thatâs a mess.â
Thanks, Captain Obvious.
But hereâs the real question: How do you get OUT of it?
Thatâs where most migrations fail. Thatâs where âdigital transformationâ initiatives go to die.
Because you canât just rewrite it. You canât do a big-bang cutover. The business is running on this system. Itâs making money - money you need to pay all the employees stored in that table.
Touch the wrong column and the company stops working.
So companies stay stuck. Paralyzed between âwe know this is terribleâ and âwe canât risk changing it.â
The First Step: Uncover Whatâs Been Hidden in the Mud
You donât try to fix everything at once. You pick ONE workflow and you make it visible.
Not in code. Not in documentation that nobody reads. You model it out visually using Event Modeling - and you uncover whatâs been hidden in the mud.
We sit down. We look at that 300-column table. And I ask: âWhat workflows is this table actually handling?â
The list comes out:
- Master Data
- Payment processes
- Employee management
- Hierarchies
- Department management
Okay. Pick one. Which one hurts the most?
Payroll! Everybody shouts.
That was easy. Letâs model out exactly how payroll actually works in your system.
And hereâs where it gets interesting: We can do it manually, sitting with Experts and Engineers or we can use AI to accelerate this. Feed it the database schema. Feed it the code. Ask it to generate a first draft of what the process might look like.
I call this âEvent Muddeling.â
Because itâs not perfect. The AI gets things wrong. But it gives us a starting point - something to react to instead of staring at a blank board wondering where to begin.
One of the best things I can get is âThis is completely wrong, let me show you how Payroll works..â - Nice! now we are talking.
When the Real Business Takes Shape
And then something magical happens.
The team starts correcting the AIâs draft. âNo, thatâs not how it works. Actually, we do this first, then this happens, then finance approvesâŚâ
And slowly - maybe for the first time in years - the actual business process becomes visible.
Not what the code does. Not what the documentation says. The real workflow thatâs been running the company.
Iâve watched senior developers whoâve maintained these systems for 10+ years see their own process clearly for the first time. Iâve watched business stakeholders realize, âOh my god, THATâS why approvals take so long.â
The process takes shape on the board. Everyone can see it. Everyone understands it.
And thatâs when the conversation shifts from âugh, legacy migrationâ to âoh⌠maybe we can actually improve this.â to âI think, we can do this!â
Unchaining the Data
Once we understand the process - once weâve mapped it out in Event Modeling - we can talk about extraction.
How do we get this payroll process OUT of the mud? How do we give it its own service, its own clean schema?
We need to âunchainâ the data.
Because thatâs really whatâs happened. The data isnât just messy. Itâs imprisoned inside that 300-column table, locked up with a dozen other processes, and nobody can use it properly anymore.
Hereâs one way to do it:
Step 1: Change Data Capture (CDC)
We start by setting up CDC - typically using Kafka Connect sitting on that old table. We fetch the initial dataset, then we get a continuous stream of every change.
Now the new system is listening. Learning. Syncing in real-time.
Step 2: Map Changes to Business Events
Hereâs where the Event Model becomes crucial.
That CDC stream is sending us raw database updates: âstatus changed to âActiveâ, last_updated changed to â2025-10-15â.â
But we donât care about columns. We care about business meaning.
So we look at our Event Model - the one we created in the workshop - and we translate:
âOh, when those three columns change together, thatâs actually an EmployeeTransferred event. We know exactly what that is because we already modeled it.â
We already did the work in step 1. Event Modeling tells us exactly what business events should exist, what they mean, what data they carry, and in what order they happen.
Step 3: Go Live in the Dark
Now hereâs the clever part: we donât cut over immediately.
The new system is already âliveâ - receiving all the data, processing it, and projecting it into employee_data_2. But nobodyâs using it yet.
employee_data_2 has the same structure as employee_data.. it became a projection of our new process.
Weâre running dark. Watching. Comparing.
Does employee_data match employee_data_2?
(Spoiler: it never does on the first try.)
When Bugs Become Features
We find discrepancies. Column values that donât match. Calculations that differ.
And we have to ask: which system is right?
Sometimes - and this is my favorite part - we discover the old system has been wrong for years.
Maybe overtime was calculated incorrectly. Maybe a status transition happened in the wrong order. Maybe a null got coerced into a zero somewhere back in 2016.
And instead of fixing it, the business just adapted. They built workarounds. They trained people to manually correct it. They built OTHER features that depended on that bug existing.
Bugs became features.
Now weâre in a room, staring at the discrepancy, and someone says: âThe new system is calculating this wrong.â
And I look at the Event Model. I look at the business rules. I look at the labor laws.
And I say: âNo. The new system is calculating it correctly. The old system has been wrong for years.â
Silence.
âBut Finance built their entire reporting system around the old calculation.â
The Pragmatic Choice
Hereâs what Iâve learned: you have to be pragmatic.
The alternative - âletâs fix the bug AND change every downstream system at the same timeâ - thatâs how migrations die.
So we make a choice: reimplement the bug. Document it explicitly in the Event Model. Move on.
Yes, itâs wrong. Yes, we know. Yes, weâre doing it anyway because Finance depends on it.
But hereâs the difference: now itâs visible.
Itâs not hidden in column 247. Itâs right there in the model: a slice. A documented, understood, deliberate choice.
The âBugâ now just became another slice in the model..
We could fix it later. We just havenât prioritized it yet. Or we just keep it..
Before: âWe canât change this because we donât know what will break.â
After: âWe could change this. We know exactly what it does. Weâre choosing not to right now.â
Inverting the Source of Truth
And then we do something that blows peopleâs minds:
We donât kill the old table. We invert the relationship.
The old 300-column employee_data that was the source of truth? It becomes a projection - a read model - of the new event-sourced system.
The events are now the source of truth. Weâre just writing back into the old table to keep legacy systems happy.
This is where senior developersâ brains break a little.
âWait. Youâre telling me this table thatâs been running payroll for 15 years is about to become a secondary artifact?â
Yes.
âWith a little bit of engineeringâ (and yes, dealing with foreign keys, triggers, stored procedures, and all the constraints), we flip the switch.
The new system is live. The source of truth has changed. And most of the time, nobody even notices because employee_data still exists - itâs just being fed from events now instead of being the origin.
What Makes Companies Tick Again
This isnât just about fixing a database schema.
This is about organizational clarity.
When companies grow, they lose something fundamental: the ability to understand themselves. To see how they actually work. To make informed decisions instead of just hoping nothing breaks.
What Iâve discovered through this process - through dozens of these migrations - is that Event Modeling gives companies back something they lost:
The ability to see and understand their own processes.
Leadership can make decisions based on visible workflows instead of tribal knowledge. Teams can collaborate across business and engineering because everyoneâs looking at the same model. New hires can understand in days what used to take months of archaeological code-diving.
The visualization doesnât just help them migrate a system. It changes how the organization thinks.
And when that happens - when processes become visible, when understanding replaces mystery, when bugs become documented choices instead of invisible traps - companies start ticking again.
Not just surviving. Actually moving forward with confidence.
The Path Forward
If youâre staring at your own 300-column nightmare right now, hereâs what I want you to understand:
You donât have to fix everything at once.
Pick one workflow. Make it visible. Map it out. Use AI to accelerate the discovery. Let your team correct it until the real process takes shape.
Then unchain it. Use CDC to bridge the old and new. Map database changes to business events. Run dark until the data matches.
And when you find bugs that became features? Document them. Make them visible. Make them a choice instead of a mystery.
Because thatâs the real transformation: from âwe donât know what this doesâ to âwe know exactly what this does, and hereâs why.â
Thatâs how you escape legacy hell.
Not with a rewrite. Not with a big-bang cutover.
With visibility. With clarity. With understanding.
Need help with this? Iâve done this dozens of times. Letâs have a 30-minute call and map out your first workflow.
Martin Dilger is the founder of Nebulit and a recognized expert in Event Modeling and event-sourced architectures. He helps mid-sized software teams escape legacy system paralysis by un-mudding their processes with industry-proven practices.
P.S. Wondering if Event Modeling can work for your specific legacy nightmare? Send me your gnarliest table schema (just the column names, no data). Iâll record a short video showing you which workflows are probably hiding in there. First 5 people only.
Join the Agentic Engineer Program
Apply Spec-Driven Development Hands-On - Event Modeling, Event Sourcing, and AI Engineering with autonomous agents.
Book a Call Today
Want to talk through how Event Modeling could work for your team or project? Letâs have a quick, no-pressure conversation.
