↗MLabsTALENT PARTNERSLet’s talk hiring ↗
← THE HIRING NOTEBOOK / SYSTEMS & PERFORMANCE

Hiring for safe database migrations: assess the sequence, not just the SQL

A database change interview for senior engineers: test compatibility, live backfills, lock awareness and the point where rollback stops being simple.

By MLabs Talent Partners · · 5 min read

A database migration can be syntactically correct and still be a poor production change. The difficult work often sits between statements: old application instances continue running, a background job updates records, and a deployment fails halfway through. If those are recurring risks in your product, your interview needs to examine the sequence of change.

This assessment is for a senior backend or systems engineer expected to own changes to a live transactional system. It does not require a separate database specialist for every team. First decide whether the missing capability is application delivery, database operations or deep engine performance; the same exercise should not become an excuse to combine three jobs.

Start with an ownership boundary

Write down who proposes schema changes, reviews their operational effects, runs backfills and handles problems during deployment. Include workers, reporting consumers and older application versions in that map. If no one can identify the readers and writers of an important table, discovery is part of the role, not a prerequisite you can assume away.

A useful hiring outcome is: enable product teams to evolve the order model while preserving agreed behaviour during mixed-version operation. Explain whether the engineer can change deployment sequencing and application code. Someone responsible only for reviewing SQL cannot reasonably own compatibility across services they cannot influence.

Give candidates a small migration packet

Use a fictional order service with an existing delivery-address field. The product now needs structured address components, but some historical records cannot be split automatically. Supply a schema, two application read paths, a worker write path and a sample of deliberately messy data. State that old and new application instances will overlap during rollout.

Ask for a plan, rather than executable SQL in the first five minutes. Which representation is authoritative at each stage? Can the new version read a record that has not been converted? What does an old worker do after the new version writes structured data? The candidate should make compatibility explicit before choosing a migration tool.

Allow documentation and provide the deployed database version. PostgreSQL's ALTER TABLE reference documents different locking and validation behaviour for different operations. Checking the exact operation and version is stronger evidence than promising that all schema changes are online. This reference informs the technical discussion; the interview structure here is our recommendation.

Walk through concurrent writes

Introduce a backfill that reads an old address, pauses, and then writes its converted result. During that pause, a customer updates the address through the application. Ask the candidate to explain the final record and whether the backfill could replace newer information. Request a concrete interleaving, not just the words race condition.

Several remedies may be defensible: conditional updates, explicit version checks, a carefully defined write path or a temporary constraint on changes. Score whether the proposal protects the business invariant and handles retries. Do not insist on your preferred mechanism if the candidate can explain another correct approach and its operating cost.

Then ask what happens to records that cannot be converted. A credible plan keeps those cases visible, routes them to an owner and defines how the application behaves meanwhile. Quietly filling missing components with invented values may satisfy a schema constraint while damaging the product. This is a useful distinction between technical completion and acceptable data.

Find the boundary of rollback

Place three markers on the proposed timeline: new code deployed, historical conversion started, old field removed. At each marker, ask what returning to the previous application version would require. The candidate should recognise that restoring code and restoring data are separate operations, especially after the new version accepts information the old representation cannot express.

Ask for a stop condition during the backfill. Examples might involve observed application latency, lock waits or unexplained reconciliation differences. The thresholds should be agreed from your service requirements and rehearsal evidence. They are not universal numbers to memorise. Require a named person who can pause the work and a description of the state left behind.

For teams in Britain and the Netherlands, discuss the actual change window, including customer operating hours and available responders. A late-evening release is not inherently safer if the only person who understands the recovery plan is unavailable. Make operational participation visible in the vacancy.

Use evidence anchors in the debrief

CapabilityEvidence that meets this brief
CompatibilityExplains old and new readers and writers at each rollout stage.
Data correctnessProtects a concurrent customer update and exposes unconvertible records.
Operational controlDefines rehearsal, progress checks, pause behaviour and ownership.
RecoveryDistinguishes code rollback from data repair and identifies irreversible steps.

A candidate who spots every risk but cannot propose a manageable sequence may need a follow-up on delivery. A candidate who produces neat SQL but skips mixed-version behaviour has not demonstrated the required scope. Record missing evidence separately from a demonstrated gap, and avoid averaging away a critical correctness concern.

Connect the assessment to the first assignment

Ask the successful hire to document one real migration path with an application owner and an operational partner, then rehearse it using representative synthetic or appropriately controlled data. Agree the expected intermediate states before scheduling production work. The first outcome should be a change another engineer can understand and stop safely.

Our benchmark interview tests a different skill: whether a performance claim is trustworthy. Use it only if optimisation is also central to the role. Migration ownership deserves its own evidence, because a faster query says little about whether the team can change its data model safely.

YOUR NEXT CHAPTER

Great teams don’t
happen by chance.

Tell us what you’re building. Let’s find the people to build it.

Discuss your next hire ↗