Screening Entry Level

How do you manage database schema changes in a Symfony project? What is your workflow for creating and deploying Doctrine migrations?

Quick Tip

Emphasise safety: "I never use schema:update in production. Every change goes through a migration file that I review before committing. Deployment runs migrate automatically. For breaking changes, I split into add-column, backfill, and add-constraint steps."

What good answers include

Workflow: modify entity attributes, run doctrine:migrations:diff to generate a migration, review the generated SQL, run doctrine:migrations:migrate to apply. In deployment: migrations run automatically as part of the deploy pipeline before the new code serves traffic. Strong candidates discuss: idempotent migrations for safety, handling data migrations separately from schema changes, the risks of doctrine:schema:update --force in production, and strategies for zero-downtime migrations (adding columns as nullable first, backfilling, then adding constraints).

What interviewers are looking for

Baseline Symfony/Doctrine workflow. Candidates who use schema:update in production or who do not review generated migrations will cause incidents. Look for awareness of zero-downtime migration strategies.

← All Symfony questions