Adding a new column is never just a line in a migration file. It’s a decision that will touch queries, APIs, indexes, and production workloads. You start with the definition: name, type, default value. Keep it minimal. Avoid nullable unless you have a deliberate plan for how missing values will behave downstream.
Run a migration in staging first. If the dataset is large, use a safe deployment strategy. In relational databases, prefer adding columns without constraints, then backfill values in small batches. This avoids locking the table for longer than the system can handle.
Review every query that interacts with the table. A new column may change query execution plans, especially in systems with tight performance budgets. Consider indexing if the column will be filtered or joined often. But remember: every index is a trade-off in write speed and storage.
Update your application layer to handle the column cleanly. This includes serialization formats, API schemas, and any integrations with external systems. If you’re using versioned APIs, roll out the change in a way that old clients still work until they can upgrade.