Adding a new column is one of the most common schema changes. Done right, it is safe, fast, and predictable. Done wrong, it can block queries, lock tables, and take down systems. The mechanics are simple. The consequences are not.
A new column changes your data model. It affects queries, indexes, and migrations. Start by defining its name, type, constraints, and default value. If it will store nullable data, plan how your application layer handles empty values. If it will be required, decide whether to populate it during migration or enforce constraints later.
When altering large tables, consider performance. Online migration tools like pt-online-schema-change or native database features such as PostgreSQL’s ADD COLUMN with metadata-only changes reduce downtime. Avoid locking by batching updates and writing idempotent SQL. Always run migrations in staging with production-like data before going live.