Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk7 min

Seven years without writing a migration: versioned models instead of migration files

A column rename can look identical to a drop-and-add in the final schema. A developer's seven-year PHP case study shows how versioned models and explicit mappings record that intent, and why preserving data is not the same as keeping old app versions working.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Renaming a production column feels dangerous because the new schema alone cannot tell a database whether you meant a rename or a drop-and-add. Dante Sabatier, in a DEV Community article dated September 29, 2026, reports that he has built and run a PHP system for about seven years without writing a migration file. Instead, the schema history lives in versioned models and explicit mappings between them. This is one developer’s architectural case study, not proof that production schema changes no longer need planning. The sections below separate three problems that migration tools tend to blur: identifying what changed between model versions, transforming schema and stored data, and deploying application versions safely. Sabatier’s full write-up is at Seven years without writing a migration.

Why a column rename looks like data loss

Suppose a table has a column called country, and a new version needs nationality. Two schema histories can end in exactly the same place. In one, the developer renamed the column and every value came along. In the other, the developer dropped country and added an empty nationality. The final schema is identical in both cases.

As an Amazon Associate I earn from qualifying purchases.

Sabatier puts the problem this way: “The final state does not contain enough information to distinguish:” the rename from the drop-and-add. Only the rename preserves existing data, so a tool that guesses wrong either silently discards values or, if it is careful, stops and asks. Everything that follows is about where that missing transition information can come from.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Where migration tools get transition intent

According to Sabatier, a migration tool has to obtain the missing information from somewhere. The options he describes are:

#1 Best Overall
  • A hand-authored operation, where the developer writes a rename step explicitly.
  • A generated migration that is then edited, where the tool proposes a drop-and-add and the developer replaces it with a rename.
  • A prompt to the developer, where the tool asks whether a removed column and an added column are the same thing.
  • A model mapping, where the relationship between the old version and the new version is recorded as part of the model itself.

The first two put the intent in a migration file. The last two, which are the subject of this article, put it in the models.

Versioned models and mappings

The core idea is that a model version is a first-class thing with its own identity, and the relationship between two versions is recorded as information rather than reconstructed from a diff. Once both versions are available, a system can ask two questions: what changed, and how should stored data move from one shape to the other.

Sabatier uses Apple Core Data as the design precedent. In his description, Core Data keeps the source and destination model versions available, and it handles migration in two modes.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Mode (Core Data, as described by the author) What the system works out on its own What must be supplied
Lightweight migration Mappings for supported changes, inferred from the two model versions For a rename of an object, a renamingIdentifier that links the new entity or attribute to the prior one
Heavyweight migration Nothing that cannot be inferred An explicit mapping model describing how each piece of data moves

Inferred mappings

Inference works when the change is structural and unambiguous: a new optional attribute, a removed attribute, or a rename that the model has marked explicitly. The system does not need to guess at meaning. It only needs to know which old element corresponds to which new one.

Explicit mappings and handlers

When a change depends on meaning or on the data itself, an explicit mapping is needed. Sabatier says the PHP system he describes adapts the Core Data idea and can run migration-stage handlers before and after a mapping. Those handlers are where data preparation or cleanup happens, such as normalizing values before a type change or filling a new field from an old one. The mapping says what moves where; the handlers say what has to be true before and after the move.

The seven-year case study

Sabatier reports that he has built this PHP system over about seven years without writing a migration file. The largest model he describes has around sixty entities and has been in daily production use for about three years. The application covers orders, production scheduling, machines, and invoicing. These are approximate figures from the author’s own account, published in the September 29, 2026 article, and no independent measurement accompanies them.

According to the author, saving changes in the model editor performs two jobs together: it updates the model and carries out the associated schema and data migration. He describes support for:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • renamed attributes and renamed entities, with data carried across;
  • changes to relationship cardinality;
  • attributes that become non-optional;
  • reorganized structures.

He points to a test named testRenamingAnAttributeRenamesTheColumnAndCarriesData, along with companion tests, as evidence that the rename case is covered. These are features and tests in his project as he reports them. They have not been independently reproduced.

His own qualification is direct: “Seven years is not proof that this scales to every team or every schema.” The case study shows that the approach can be kept working over a long period by one developer on one application. It does not establish how the approach performs across larger teams, different schema shapes, or different operational constraints.

What inference cannot solve

Sabatier does not claim that every change can be inferred, and he does not claim that every production migration is safe just because it is recorded in a model. Some changes are semantic, data-dependent, or staged, and they need human direction. A few illustrative cases where that applies:

  • splitting one field into two, where the right split depends on the content of each row;
  • changing the meaning of a code value, where old and new codes may need a lookup table;
  • a change that must happen in several deployment steps, not one.

In these cases the model can record that a change happened, but it cannot decide on its own how the data should be interpreted. The explicit mapping and its handlers exist for exactly this gap.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How other frameworks handle renames

Sabatier also describes how several widely used tools treat the same rename problem. These are his descriptions of the tools, not verified against current official documentation, and framework behavior changes between versions, so check each project’s documentation before relying on any of them.

Tool Behavior as the author describes it
Prisma The documented default for a rename creates the new column and drops the old one. He describes generating a draft with --create-only and editing the SQL to perform a rename instead.
Entity Framework Core May scaffold a drop and add for a property rename. He recommends replacing those operations with migrationBuilder.RenameColumn.
Django The autodetector can recognize likely renames but asks when intent is unclear.
Rails and Laravel Use explicit rename operations inside migrations.
Doctrine He describes its documentation as warning against using SchemaTool as a production migration mechanism.

Preserving data is not preserving compatibility

The most useful point in the article is that a correct data transformation is only half of a safe deployment. Sabatier states the distinction plainly: “Preserving data is not the same thing as preserving application compatibility.”

Consider a rolling deployment. Old application instances still query country, while new instances query nationality. If the database column is renamed in place, every row survives, but the old instances now fail on every query that touches the column. The data is intact and the old version is broken at the same moment.

Sabatier says the answer is usually expand-and-contract, which he describes in these steps:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Add a compatible representation alongside the old one, such as a nationality column next to country.
  2. Deploy code so that both application versions keep working against the database.
  3. Migrate or backfill the data from the old representation into the new one.
  4. Once no running version depends on the old representation, remove it.

This sequence is independent of whether transition intent comes from a migration file or from a model mapping. Recording a rename correctly does not make the deployment safe on its own. Teams still need to decide how long both representations coexist and when the old one can be removed.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What migration files still do well

Sabatier does not argue that explicit migration files are wrong. He acknowledges their value directly: “They have a real virtue: they are reviewable.” A migration file is a discrete artifact. Teams can read it, discuss it in review, test it on its own, and deploy it as a unit. That is a real advantage, and it is the thing a model-based approach has to replace with something equally inspectable.

Comparing the two approaches

The table below uses the axes Sabatier’s account suggests. Where the article does not describe a point for one approach, the cell says so.

Question Migration files Versioned models and mappings (as described)
Where transition intent is recorded In a separate migration artifact for each change In the model versions and the relationships between them
How ambiguous changes are handled Hand-authored operations, edited generated drafts, or interactive confirmation, depending on the tool Inferred mappings for supported changes; explicit mapping models and handlers for the rest
How data transformation is expressed and reviewed In migration code, reviewed as that code In mappings and before/after handlers; the article does not describe a separate review workflow for them
Rolling deployments and old/new compatibility Not addressed by the file format; expand-and-contract sequencing is still required Not addressed by the model format; the author says expand-and-contract is still needed
Reviewable and testable as discrete artifacts Yes, the author’s stated virtue of migration files Model changes and mappings can be tested, such as the rename test he cites; the article does not describe them as discrete review units

Who this approach fits

The design is most relevant to a single application maintained over many years, where the models are the main source of truth and the team is comfortable recording transitions in the model layer. The case study supports that narrow claim. It does not support a general rule that migration files are unnecessary. Teams with several developers, shared review processes that depend on migration files, or schemas that change in data-dependent ways should weigh the criteria above against their own constraints before changing anything.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The lesson that transfers most cleanly is the separation Sabatier draws: a rename that preserves data still needs a deployment plan that keeps old and new application versions working.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.