One migration, one statement, and the shape of your data shifts in ways that ripple through your application. Adding a new column in a database is both simple and dangerous. It is simple because the syntax is short. It is dangerous because the downstream effects can break queries, slow performance, and trigger subtle bugs.
To add a new column in SQL, you issue an ALTER TABLE command. In PostgreSQL:
ALTER TABLE users ADD COLUMN last_login TIMESTAMP;
This is instant if the table is small. On large tables, the operation can lock writes and reads. Some databases rewrite the table on disk, causing downtime. Understanding the behavior of your engine—MySQL, PostgreSQL, or others—is critical before applying schema changes in production.
A new column introduces questions about defaults, nullability, and indexing. Setting a default value forces the database to update every row, which can cause delays. Allowing NULL skips that rewrite but changes how queries behave. Adding an index on the new column can speed reads but slow writes. Every choice affects performance and reliability.