top | item 37755860

(no title)

exekias | 2 years ago

^ this is exactly how it works :)

discuss

order

javaunsafe2019|2 years ago

But if it works like that aren’t there schema migration paths that are changing the actual content of a column and are then not undoable?

surjection|2 years ago

Any pgroll operations[0] that require a change to an existing column, such as adding a constraint, will create a new copy of the column and backfill it using 'up' SQL defined in the migration and apply the change to that new column.

There are no operations that will modify the data of an existing column in-place, as this would violate the invariant that the old schema must remain usable alongside the new one.

[0] - https://github.com/xataio/pgroll/tree/main/docs#operations-r...

pcthrowaway|2 years ago

Also, if the data isn't deleted couldn't this lead to database bloat?