Adding a new column sounds small. In practice, it touches every layer of your system. From DDL statements to ORM migrations, from indexes to read replicas, it’s a chain reaction. Done wrong, it can block writes or cause silent data loss. Done right, it’s invisible to users.
Start with the database. Use ALTER TABLE only when you know the table size, the column type, and the locking behavior of your engine. In Postgres, adding a nullable column with no default is instant. In MySQL, large tables may lock on schema change without ONLINE modifiers. Check your version. Read the docs, not just code snippets.
Define the column type with precision. Avoid generic placeholders like TEXT or VARCHAR(255) unless justified. Use constraints when possible. They are part of your contract with the data.
Update your application code in stages. First, deploy with the code tolerant to both old and new schemas. Then run the migration. Finally, deploy the code expecting the new column. This pattern reduces downtime and keeps deploys reversible.