Creating a new column should be instant. In SQL, the syntax is straightforward:
ALTER TABLE users ADD COLUMN last_login TIMESTAMP;
That one statement updates the schema. You can set default values, define constraints, or index the new column immediately. Well-structured migrations keep these changes atomic and safe for production.
In PostgreSQL, adding a column with a constant default is metadata-only in most modern versions, so the operation completes fast without rewriting the entire table. In MySQL, defaults require a full table lock depending on storage engine and version. Understand your database engine before running this on large datasets.
For high-availability systems, wrap schema changes in transactional migrations when possible. Tools like Flyway or Liquibase track versions and ensure consistent changes across environments. Combine that with feature flags to control application code that reads or writes the new column, allowing you to deploy without downtime.