Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qwat_sys tables are empty when using .sql files for database initialization #357

Open
varrieta opened this issue May 23, 2022 · 9 comments
Labels
Bug Datamodel Datamodel related

Comments

@varrieta
Copy link

qwat_sys tables end up empty when using .sql files for database initialization

I used the files qwat_v1.3.6_structure_only.sql and after that qwat_v1.3.6_value_list_data_only.sql.

The issue was reproduced by @olivierdalang

@ponceta ponceta added Bug Datamodel Datamodel related labels May 24, 2022
@ponceta
Copy link
Member

ponceta commented May 24, 2022

Is it working for the wastewater module? Same approach to be replicated?

@varrieta
Copy link
Author

varrieta commented May 24, 2022

Yes, it is working for the wastewater module.

For qgep, you can create the structure and populate the value lists together by using (for example) qgep_1.5.6-1_structure_with_value_lists.sql

@varrieta
Copy link
Author

varrieta commented Sep 15, 2023

@ponceta Has this issue been discussed within the technical group ? Is there a workaround that could be use for windows user to setup a QWAT database ?

Edit: forgot to say that the same issue happen when using the two .backup files

@varrieta
Copy link
Author

And the issue remain with v 1.4

@sjib
Copy link

sjib commented Sep 18, 2023

QGEP/QGEP#741 - see differences qgep / qwat

@sjib
Copy link

sjib commented Sep 18, 2023

@varrieta You could try something like this:

INSERT INTO qwat_sys.info( version, description, type, installed_by, installed_on, execution_time, success ) VALUES ( '1.0.0', 'baseline', 'postgres', now(), 1, true );

@varrieta
Copy link
Author

Is that the only table in qwat_sys that has to be filled ? If it is, I'll proceed as you propose

@sjib
Copy link

sjib commented Sep 20, 2023 via email

@ponceta
Copy link
Member

ponceta commented Sep 21, 2023

This is a pertinent issue.

On a single installation you can fix it either with the pum baseline function https://github.com/opengisch/pum#baseline or with the suggested SQL statement proposed by Stefan.

This should be adressed in the release process when defining files to be published at each release knowing that @cymed mentionned that .sql files are more suited for cloud base deployement than custom .backup formats.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Datamodel Datamodel related
Projects
None yet
Development

No branches or pull requests

3 participants