Adding a new column is simple when the database schema is under control. In SQL, the pattern is clear:
ALTER TABLE users ADD COLUMN last_login TIMESTAMP;
It works for Postgres, MySQL, and most relational systems. The operation adds storage and definition to your table without altering existing data. For production workloads, the process must be safe. Test it in staging first. Watch for locks. On large tables, adding a new column can lock writes for seconds or minutes.
For zero-downtime migrations, break it into steps. First, add the column with a nullable definition or a default value. Second, backfill data in small batches to avoid load spikes. Third, update application code to read and write the new field. Deploy that change after the migration is complete.
Use descriptive names. Match column types to usage. Avoid mixing formats, especially for timestamps, JSON, or ENUM types. Keep constraints minimal on the first pass; tighten them after validating integrity. This keeps migrations fast and safe.