qwat / qwat-data-model

TEKSI Water module (project QWAT) - PostgreSQL / postgis Datamodel
https://www.teksi.ch
23 stars 24 forks source link

PUM tries to apply an old delta - bis #346

Closed kandre closed 2 years ago

kandre commented 2 years ago

When updating the model from 1.3.3 to 1.3.5, PUM raised and an error while applyling deltas. Pum tried to apply an old delta, in my case delta_1.3.3_010_add_cover_fk_precision_alti_fk_obj_reference.sql which lead to an error saying that the sql cannot be executed. Indeed, the delta content has already been applied in the database in the past.

This reminds me #341, although a bit different.

Then I typed the following command pum info -p pum_qwat_prod -t qwat_sys.info -d ./update/delta which, surprisingly, informed me that the delta 1.3.3_010 was still "pending" instead of "applied" on my model.

Thanks to #341 resolution, I remarked that checksum of that applied delta in my qwat_sys.info was incorrect. As done in #341, I edited the checksum to go through and it solved the problem. However I can't tell why this delta checksum was incorrect.

I think a good practise after using PUM would be to type in the pum info command and check the result if all targeted deltas are "applied".