You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Down migrations are applied to adapt data from the latest schema version into the previous one. During the active migration period, you will have a new schema version that doesn't have the column, while the old schema (that has it) is still available.
If the deployed version of your application expects a value in that column (or there is a constraint requiring it, ie NOT NULL), down function can be used to ensure that all inserts/updates happening in the new version of the schema get a valid value backfilled into this column for the old version of the schema (and its clients) to consume.
Hope this clarifies things? I realize docs may need some more explanation, we can use this issue to ensure we update them!
This section here:
https://github.com/xataio/pgroll/blob/9d2515963865ba4b5b71fe0ff9ea85e8ce9e2ddf/docs/README.md#drop-column
It's not obvious to me what the
"down"
key here is used for.The text was updated successfully, but these errors were encountered: