iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
A column rename looks like the simplest change in a database, yet it is the one most likely to lose data if the migration tool guesses wrong. Dante Sabatier, writing on DEV Community on September 29, 2026, reports that he has built and run a PHP system for about seven years without writing a migration file. His approach stores schema history in versioned models and explicit mappings instead. This article explains the problem that approach is meant to solve, how it works as he describes it, where it fits and where it does not, and what it does not prove.
Why a production rename feels dangerous
Imagine a customers table with a country column that the business now wants to call nationality. Before the change, the database holds years of values in country. After the change, it holds the same values under a new name, plus any rows created since.
The trouble is that the final schema does not record how it got there. A tool looking at the before and after states sees a missing column and a new column. It cannot tell whether a developer meant to rename the first column or to drop it and add an unrelated one. Sabatier puts the problem this way: The final state does not contain enough information to distinguish:
the two possible histories, one of which preserves data and one of which discards it.
Free tools Windows power users keep installed
One-click scans. No signup required.
That is why a rename feels risky even when the SQL is short. The change is not only structural; it carries intent, and intent is exactly what the schema alone does not hold.
#1 Best Overall
Where migration tools get transition intent
Any tool that moves a database from one schema to another has to obtain the missing transition information from somewhere. In the author’s account, there are four common sources:
- A hand-authored operation. The developer writes the migration directly, for example a rename statement rather than a drop and an add.
- A generated migration that is edited. The tool produces a draft, and the developer corrects the part it got wrong before it runs.
- A prompt to the developer. The tool detects a likely rename and asks whether that is what was meant.
- A model mapping. The intent is recorded as part of the model’s history, so the tool does not need to guess.
The first three keep the transition in a migration artifact that is written or confirmed at the time of the change. The fourth, which is the subject of this article, records it in the models themselves.
Versioned models and mappings
The core idea is that each version of a data model is kept as a first-class object, and the relationships between versions are stored explicitly. A new version knows what the previous version was, and it knows how each attribute or entity maps forward.
Sabatier borrows the design precedent from Apple’s Core Data framework. In his description, model versions remain available as source and destination for a migration. Two mechanisms matter:
Inferred mappings (lightweight migration)
For supported kinds of change, the framework infers the mapping between source and destination without help. Where an object has been renamed, a renamingIdentifier tells the system which prior object it corresponds to. The developer supplies only the one fact that cannot be derived from the two versions: the identity link.
Explicit mappings (heavyweight migration)
Some changes cannot be inferred. A split of one field into two, a conversion of a value from one unit to another, or a restructuring that depends on the contents of the rows all require instructions. For these, heavyweight migration uses an explicit mapping model that states how each source object becomes each destination object.
Rank #2
- Ideal for specialists managing database migrations, a thoughtful gift for those excelling in smooth transitions.
- A humorous design for migration experts – "Don't Panic, I'm a Professional Database Migration Specialist!"
- Lightweight, Classic fit, Double-needle sleeve and bottom hem
Handlers before and after the mapping
The PHP system Sabatier describes adapts this approach and says it can run migration-stage handlers before and after a mapping. A pre-handler can prepare or normalise data so the mapping has clean input. A post-handler can clean up afterwards. These handlers are where data preparation that does not fit a simple mapping lives.
Recommended Free Tools
The seven-year case study, as the author reports it
The claim at the centre of the article is that Sabatier has worked for about seven years on his PHP system without writing a migration file. He describes a workflow in which saving a change in the model editor performs the model update and the associated schema and data migration together. In his words: The model changed, and the schema and the data followed.
He reports handling several kinds of change this way:
- renamed attributes and renamed entities;
- changes to relationship cardinality;
- non-optional attributes;
- reorganised structures.
To support the rename case, he points to a test named testRenamingAnAttributeRenamesTheColumnAndCarriesData, along with companion tests. These are features and tests in his own project. They have not been independently reproduced, and the article does not describe a third-party evaluation.
The scale he describes
The largest model he describes has around sixty entities. It has been in daily production use for about three years. The application is a business system covering orders, production scheduling, machines, and invoicing. These are approximate figures from the author, not measurements from an audit.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsWhat seven years does and does not establish
A long run in one application is meaningful evidence that the approach can work for that application and that developer. It is not evidence of general safety. Sabatier is direct about this: Seven years is not proof that this scales to every team or every schema.
The article offers no published study, survey, or industry statistic on how often this design succeeds, and none of its examples should be read as a population-level result.
Rank #3
- Ideal for specialists managing database migrations, a thoughtful gift for those excelling in smooth transitions.
- A humorous design for migration experts – "Don't Panic, I'm a Professional Database Migration Specialist!"
- 8.5 oz, Classic fit, Twill-taped neck
The hard case inference cannot solve
Inferred mappings cover the changes whose meaning is visible in the two model versions. They do not cover changes whose meaning depends on business rules or on the data itself. Sabatier’s own examples of this category include:
- a value whose meaning changes, such as a status code that is reinterpreted;
- a field split or merge where the correct split depends on the existing content;
- a change that must be staged, with data backfilled before a constraint is tightened.
For these, a person has to direct the transformation. The explicit mapping and handlers give that direction a place to live, but they do not remove the need for judgement. He does not claim that every change is inferable, that every production migration is safe automatically, or that the approach eliminates review.
How popular frameworks handle renames, according to the author
Sabatier compares his approach with the default behaviour of several frameworks. The statements below are his description of those tools. They were not independently rechecked against current documentation or specific version behaviour, so confirm them against each project’s official docs and the version you run before relying on them.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
| Tool | Behaviour the author describes | Handling he recommends |
|---|---|---|
| Prisma | Documented default for a rename is to create the new column and drop the old one. | Generate a draft with --create-only and edit the SQL so it renames the column. |
| Entity Framework Core | May scaffold a drop and an add for a property rename. | Replace those operations with migrationBuilder.RenameColumn. |
| Django | The autodetector can recognise likely renames but asks when intent is unclear. | Answer the prompt deliberately rather than accepting a drop and add. |
| Rails and Laravel | Migrations use explicit rename operations. | Write the rename operation in the migration file. |
| Doctrine | Warns against using SchemaTool as a production migration mechanism. |
Use versioned migrations for production changes. |
The pattern across these tools is that a rename is safe only when someone has stated it. Whether that statement lives in a migration file, a prompt answer, or a model mapping is the design choice the article examines.
Preserving data is not enough for a rolling deployment
The author separates two questions that are often merged. The first is whether the data survives the transition. The second is whether the application versions running at the same time can still work with the database. He puts the distinction plainly: Preserving data is not the same thing as preserving application compatibility.
Consider a rename from country to nationality during a rolling deployment. Some instances still run the old code, which queries country. Some run the new code, which queries nationality. If the column is renamed in place, every row keeps its value, but the old instances now fail. The data is intact and the application is broken.
Rank #4
Sabatier says expand-and-contract may still be needed, whichever way the transition is derived:
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →- Add a compatible representation of the new column alongside the old one.
- Keep both application versions working against the database during the rollout.
- Migrate or backfill the data into the new representation.
- Remove the old representation once no running version depends on it.
The model-based approach makes step one and step three easier to express. It does not remove the need to plan the sequence.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Comparing the two approaches
Explicit migration files have a real advantage that the author acknowledges: They have a real virtue: they are reviewable.
A migration is a discrete artifact that a team can read, test, discuss, and deploy as a unit. The table below compares the two approaches on the axes that matter for this decision. Where the article does not address a point, the table says so.
| Question | Separate migration files | Versioned models and mappings |
|---|---|---|
| Where transition intent is recorded | In a migration artifact written or edited for each change. | In the model versions and their relationships. |
| Handling of ambiguous changes | Hand-authored operations, edited generated drafts, or prompts. | Inferred mapping for known patterns; explicit mapping or handler for the rest. |
| Expressing data transformation | Written as part of the migration. | Expressed as a mapping and pre- and post-handlers, per the author’s PHP system. |
| Review and testing | Each migration is a discrete file that can be reviewed and tested. | Review happens on model changes and their tests; the article does not describe a separate artifact for each change. |
| Rolling deployments and old/new compatibility | Not addressed by the file format itself; expand-and-contract is still required. | Not solved by the model approach; the author says expand-and-contract may still be needed. |
| Evidence offered | Common industry practice. | One developer’s account of about seven years, with approximate scale figures. |
The author does not argue that explicit migration files are wrong. His claim is narrower: for a single system whose schema history is held in its models, the explicit record of intent can be kept where the models already are.
Who this approach is likely to suit
- Teams whose application already models its entities in code and keeps those models under version control.
- Single applications where one team controls both the model and the database.
- Projects where most changes are renames, relationship changes, or structural reorganisations that the mapping can express.
It is a weaker fit for teams that need a formal review gate on every schema change, have several services sharing one database, or depend on tooling that expects migration files as the unit of deployment.
Anyone evaluating this design should read the author’s original article for the full set of examples and the test descriptions: Seven years without writing a migration, Dante Sabatier, DEV Community, September 29, 2026.
When you assess a rename in your own system, test three things separately: whether the data survives, whether each application version still runs against the schema while the rollout is in progress, and whether the transition’s intent is recorded somewhere a reviewer can see.
The Bottom Line
Versioned models with explicit mappings are a credible way to keep a schema’s intent alongside its data, and Sabatier’s seven-year, single-application account shows the approach can run in production. It is not evidence of general safety. Whichever method you use, a rename that preserves data can still break an older application version, so plan the rollout sequence as carefully as the transition itself.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

