top | item 46898193

(no title)

nopurpose | 25 days ago

Is there a good tool for background migrations?

For example add temporarily nullable column to a large table, deploy new code which starts writing to the new column, in background populate that column for existing rows in batches and finally alter column to be mandatory non-nullable.

Another example of non-trivial schema management case is to make schema change after new version rollout completes: simple migration at the start of the container can't do that.

It must be a solved problem, but I didn't see a good tool for it which would allow expressing these imperative changes in a declarative way which can be comitted and reviewed and tested along the app code. It is always bunch of adhoc ugly scripts on a side and some hand waving deployment instructions.

discuss

order