qwat / qwat-data-model

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

Hardcoded SRS in deltas #199

Closed ponceta closed 5 years ago

ponceta commented 6 years ago

SRS should not be hardcoded :

delta 1.1.0 https://github.com/qwat/qwat-data-model/blob/master/update/delta/delta_1.1.0.sql#L48-L50 https://github.com/qwat/qwat-data-model/blob/master/update/delta/delta_1.1.0.sql#L296

3nids commented 6 years ago

@marioba does pum handle parameter to psql commands? such as psql -v SRID=2056

marioba commented 6 years ago

@3nids No, not at the moment. Pum only executes the code found in the sql files as it is using psycopg2.

elemoine commented 6 years ago

The SRS is hardcoded in Pum Python scripts as well. See https://github.com/qwat/qwat-data-model/blob/master/update/delta/post-all.py#L14 for example.

3nids commented 6 years ago

I just added variables for SQL deltas, it shouldn't be a big deal to add them for python deltas. Let me know if you want me to add them.

ponceta commented 5 years ago

@kandre in what version of QWAT are you?

Please reopen this if you encounter any troubles when migrating.

kandre commented 5 years ago

@ponceta FYI we have 1.2.8 in production but not sure if I will be concerned by this issue or not. I'll see that when upgrading thanks !

3nids commented 5 years ago

isn't this a high priority?

ponceta commented 5 years ago

https://github.com/qwat/qwat-data-model/blob/master/update/delta/post-all.py#L14

@3nids I missed the post-all .py delta file. This is indeed a high priority bug.

Actually I can't update anymore since postgres 9.5 or higher is required so I'm stuck in 1.3.2

lbartoletti commented 5 years ago

Closed with a workaround in https://github.com/qwat/qwat-data-model/pull/298 I will check the bug with pum