Adding a new column should be fast, safe, and predictable. Schema changes like this are simple in theory, but the wrong approach can lock a table, block writes, or trigger downtime. In production, a flawed migration costs more than time — it can cost trust.
To add a new column, first decide on its name, type, and constraints. Choose types that match the intended data exactly. Avoid overusing nullable fields unless the absence of data is valid. If the new column requires a default value, define it in the migration to prevent null insertions and keep the schema consistent.
Plan for the impact on existing queries and indexes. Adding an index to the new column during creation can improve performance, but it can also slow the migration process if the table is large. For high-traffic systems, consider adding the column without the index, backfilling data in batches, and then creating the index in a separate step.