qwat / QWAT

TEKSI Water module (project QWAT) - QGIS project
https://www.teksi.ch
GNU General Public License v2.0
58 stars 31 forks source link

qwat data restore procedure needs to upgrade sequences index #173

Closed haubourg closed 6 years ago

haubourg commented 7 years ago

After restoring demo data on a newly initiated database structure, sequences start from 1 and risks to override existing values (which will fail). A restoring procedure should be provided to fix that. See https://wiki.postgresql.org/wiki/Fixing_Sequences

haubourg commented 7 years ago

I found a tool dedicated here: /tools/fn_qwat_od_update_sequences.sql Keeping this opened until this is documented or put in a restore script

haubourg commented 6 years ago

Best pratice is to dump separatly ordinary data and value lists so that no PK conflict can happen. Value lists are considered as part of the model and not user data and should be handled in customisation scripts