mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-16 10:33:27 +08:00
Before this change during downgrade script generation we would always fetch the pre-update script from the previous version and prepend it to the generated scripts. This limits what can be referenced in the pre-update script and also what is possible within the downgrade itself. This patch splits the pre-update script into a generic part that is used for update/downgrade and an update specific part. We could later also add a downgrade specific part but currently it is not needed. This change is necessary because we reference a timescaledb view in the pre-update script which prevents changes to that view.