The query ran fast and clean until the schema changed. Then every join, every index, every cache was off. You needed a new column. Not tomorrow. Now.
Adding a new column can be simple or it can bring production to its knees. The difference is execution. Schema changes touch the core of a database. They affect read and write performance. They can break application code. They can lock tables, block queries, and cause downtime if handled poorly.
The safest way to add a new column depends on your database engine, version, and the volume of traffic. In MySQL and PostgreSQL, smaller tables can be altered in place with ALTER TABLE ... ADD COLUMN. On large, high-traffic tables, you need an online migration strategy. Tools like pt-online-schema-change (for MySQL) or ALTER TABLE ... ADD COLUMN with LOCK=NONE in modern versions can reduce blocking. For PostgreSQL 11+, adding a nullable column with a default can be non-blocking if you declare it without a constant default and backfill later.