openskills.info
Course Preview

Schema Migration and Change Management

Schema migration is the controlled process of changing a database structure while keeping its data and applications usable. Change management adds version history, review, testing, deployment sequencing, monitoring, and recovery decisions around those changes.

itDatabases and data storage

Don't Panic: Schema Migration and Change Management

A schema migration is a controlled change to the shape of a database. It exists because tables, columns, indexes, and constraints eventually stop fitting the application that depends on them. Before migrations were part of delivery, a database could acquire important changes by hand, at different times, in different places. That is how a schema becomes both mysterious and very confident about it.

The useful mental model is a versioned contract. Migration files say what should happen. The live schema is what traffic meets. The migration history records what happened before. Those three things need to agree, but agreement does not mean the operation is harmless. A small-looking ALTER TABLE can ask for a lock, scan a large table, or make replicas work overtime.

The surprising bit is that the dangerous moment is often not the command. It is the overlap. Old and new application processes can run together during a deployment, each expecting a slightly different database. The familiar answer is expand-and-contract: add a compatible new form, move data and application behavior toward it, then remove the old form later. The temporary duplication is not clutter. It is the bridge that lets incompatible versions avoid meeting in a dark alley.

Data movement deserves its own attention. Adding a nullable column changes structure. Filling it changes rows. Enforcing a constraint changes what future writes may do. A bounded backfill gives each batch a defined retry shape and a chance to observe locks, latency, disk pressure, and replica lag. Completion is useful, but verification is the real destination: check the history ledger, the schema, the data, and the critical reads and writes.

Rollback is less magical than it sounds. A transaction can abort uncommitted work when the engine supports it. A compensating migration can restore compatible behavior. But removing a field after new data has arrived may remove the evidence needed to recover. Applied migration files are shared history, so a correction is normally a new change, not an edit to an old one.

Read the intro for the full control loop and deployment path. Use the slides for the sequence and failure shapes. Keep the cheatsheet nearby when reviewing locks, engine behavior, stop signals, and recovery. Then try Practice and Exercise in a disposable database, where the only customer complaint is a row with an unexpectedly empty name.

Where this skill leads

Relevant careers

See how this topic contributes to broader role-level skill maps.

Sources