The query hit the database, but the result was missing a field you needed. You knew what had to happen next: add a new column.
A new column is more than another piece of your schema. It changes data shape, migrations, indexing, and application logic. Get it wrong and you risk downtime or data corruption. Get it right and you unlock features, performance gains, and clean code paths.
When adding a new column in SQL, first assess your migration path. Decide if it will be nullable, have a default value, or require backfilling historical rows. On large tables, adding a column with a default can lock writes. Use NULL and backfill in batches to avoid blocking in production.
Name the new column with precision. Avoid vague labels that force developers to read documentation to guess its meaning. Stick to lowercase snake_case in Postgres and avoid reserved words.