Adding a new column is one of the most common schema changes in modern databases. It looks simple, but it can break production if done without discipline. Performance, locking, and data integrity all depend on how you handle it. Whether you’re working in PostgreSQL, MySQL, or a cloud-native service, the method you choose dictates your risk level.
The fastest path is an ALTER TABLE ADD COLUMN command. In small datasets, it’s instant. In large, high-traffic systems, it can trigger a full table rewrite or block reads and writes. Before running it, confirm your database engine’s behavior. Some engines allow adding nullable columns without locking. Others will lock until execution completes.
If the column needs a default value and a NOT NULL constraint, split the change into multiple steps: