When creating a new column, first define its purpose and data type. Choose the smallest type that fits. Avoid NULL defaults unless required. If the column must be indexed, plan the index creation to avoid locking production traffic. For large datasets, consider backfilling in batches to prevent table-level locks and replication lag.
In SQL, adding a new column is straightforward:
ALTER TABLE users
ADD COLUMN last_login TIMESTAMP WITH TIME ZONE;
But in practice, you must account for migrations, application code, and backward compatibility. Deploy the schema change first without relying on the new column. Then ship code that writes to it. Only after writes are stable should you read from it. This two-step release avoids race conditions and reduces the risk of rollback complexity.