pg-differ icon indicating copy to clipboard operation
pg-differ copied to clipboard

Removed columns should be made null-able

Open mitar opened this issue 3 years ago • 1 comments

So I think it is OK that removed columns are kept. But they should be changed so that NULL values can be inserted into them. This means that future queries which do not know about those columns can succeed and database will just insert NULL values in their place.

mitar avatar Apr 28 '21 07:04 mitar

It would also be useful to rename them, something like _<old name>_<deletion timestamp> so that any query assuming they are still around would start failing (one can detect bugs this way) and that any future column which happens to share the name (when you forget that there was already a column with this name) does not conflict.

mitar avatar Apr 28 '21 07:04 mitar