The query ran. The table was big. It needed a new column.
Adding a new column to a live database can be simple or it can bring production to its knees. The difference comes down to strategy and execution. Schema changes carry risk: locks, downtime, and broken code paths. When you define the ALTER TABLE command for a large data set, you must plan for impact.
Start by identifying the column type, default values, and nullability. A NOT NULL column with a default value on a massive table will rewrite every row unless the database engine supports metadata-only changes. In MySQL, this often means using ALGORITHM=INSTANT when possible. In PostgreSQL, certain column additions with defaults can execute instantly without table rewrites, starting in newer versions.
Always verify the database version and engine capabilities before making the change. On smaller tables and staging environments, run the change and measure its duration. Then test the dependent queries, ORMs, and services to ensure they recognize the new column without runtime errors.