Adding a new column in a database is not just schema work. It is design. It is performance. It is risk. Each choice—type, default value, nullability—carries consequences for storage, index efficiency, and application logic.
Start with precision. Define the exact data type based on constraints and usage. Avoid generic types that mask intent. Use VARCHAR only when length is uncertain; use TEXT sparingly. For numbers, choose exact fit: INT or BIGINT as needed. For time, always specify timezone context.
Control defaults. A poorly chosen default can silently distort analytics or create hidden bugs. Explicitly set NOT NULL when the column is required. Consider whether the column should have a generated value or reference another table.
Plan the migration. On large datasets, adding a new column can lock tables, block writes, or cause downtime. Use online schema changes where supported. Break heavy updates into smaller batches. Monitor replication lag.