3 ms·
You probably could, but you really want your database migrations to clear, repeatable, and dead simple. I can also imagine edge cases like a migration dropping
by netghost 2y ago
You probably could, but you really want your database migrations to clear, repeatable, and dead simple.
I can also imagine edge cases like a migration dropping a column and another recreating it where it may be unclear what the state is, and honestly you don't want to be surprised when you migrate thousands of paying customers' data.
- AdieuToLogic 2y agoAnother reasonable example is a migration which adds a column ultimately intended to be "not null". The first migration might add the column as nullable, then subsequent migrations and/or server logic populate the column, culminating with a future migration which alters the constraint to be "not null".