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

Fix default values #502

Merged
merged 1 commit into from
Dec 4, 2024
Merged

Fix default values #502

merged 1 commit into from
Dec 4, 2024

Conversation

cymed
Copy link
Contributor

@cymed cymed commented Nov 29, 2024

in tww_app.ft_set_default_values(), I passes an incorrect argument to tww_app.get_default_values(text), using table name instead of column name

@cymed cymed requested a review from ponceta November 29, 2024 10:30
@cymed cymed self-assigned this Nov 29, 2024
@cymed cymed added the app_schema Concerns the application schema label Nov 29, 2024
@cymed cymed linked an issue Nov 29, 2024 that may be closed by this pull request
@cymed cymed marked this pull request as ready for review November 29, 2024 10:44
@ponceta
Copy link
Member

ponceta commented Dec 3, 2024

image

Postgres Default values are well interpreted but NULL for our

    fk_dataowner character varying(16) COLLATE pg_catalog."default" DEFAULT tww_app.get_default_values('wastewater_structure'::text),
    fk_provider character varying(16) COLLATE pg_catalog."default" DEFAULT tww_app.get_default_values('wastewater_structure'::text),

@ponceta
Copy link
Member

ponceta commented Dec 3, 2024

@cymed Souldn't it be

    fk_dataowner character varying(16) COLLATE pg_catalog."default" DEFAULT tww_app.get_default_values('fk_dataowner '::text),
    fk_provider character varying(16) COLLATE pg_catalog."default" DEFAULT tww_app.get_default_values('fk_provider '::text),

?

@ponceta
Copy link
Member

ponceta commented Dec 4, 2024

OK I figure out how it is supposed to work and it seems to work fine.

For now it looks like it is not possible to remove such a value once it is defined.

@urskaufmann We will then be able to remove all these fields from the QGIS project as they are fully managed by the database.

@ponceta ponceta merged commit 7149100 into teksi:main Dec 4, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app_schema Concerns the application schema
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Database default values don't work in QGIS
2 participants