The migration was almost done when you saw it: you forgot to add the new column.
Adding a new column to a live database should be fast, safe, and predictable. It can be done without downtime, without blocking queries, and without corrupting data. The process changes depending on the database: PostgreSQL, MySQL, or SQLite each have their own rules. But the principle is the same—define the column, set defaults if needed, and deploy in a way that won’t break existing reads or writes.
Start by declaring the column in your schema. Use the correct data type and constraints the first time—changing them later will trigger heavier migrations. In PostgreSQL, ALTER TABLE your_table ADD COLUMN new_column_name data_type; is instant for most types but not for ones with defaults that require a rewrite. If you need a default, set it in two steps: add the column as nullable, then update rows in batches, then set NOT NULL and the default.
In MySQL, modern versions allow ALTER TABLE ... ADD COLUMN with ALGORITHM=INPLACE for minimal locking, but this still depends on the column type and storage engine. In SQLite, adding a new column is straightforward with ALTER TABLE, but removing or altering one requires creating a new table and copying data over.