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

2024 10 29 add protection tube distant control cable #388

Open
wants to merge 40 commits into
base: master
Choose a base branch
from

Conversation

sjib
Copy link

@sjib sjib commented Oct 29, 2024

Should solve #387

@sjib sjib self-assigned this Oct 29, 2024
@sjib sjib marked this pull request as draft October 29, 2024 17:38
@kandre
Copy link
Contributor

kandre commented Nov 4, 2024

@sjib I am applying the changes from this PR to a test version of my installed model. I executed the SQL scripts in the sequence specified by init_qwat.sh.

While running 03_qwat_db_organisation.sql, I encountered the following error:

ERROR: relation "value_list_base" already exists

What would you recommend in this situation?

@sjib
Copy link
Author

sjib commented Nov 4, 2024

@kandre That is the point that I have to fix first with two conflicting version of value_list_base.

You can test on tww or tdh

@kandre
Copy link
Contributor

kandre commented Nov 5, 2024

Do you think you'll be able to resolve this soon?

I'm concerned I won't be able to test it quickly on tww and tdh due to the time-consuming process of installing or migrating the models, which conflicts with my current schedule. Has anything changed on that front?

@sjib
Copy link
Author

sjib commented Nov 13, 2024

@kandre can you try again?

@sjib
Copy link
Author

sjib commented Nov 13, 2024

  • Add delta files

@sjib
Copy link
Author

sjib commented Nov 16, 2024

HINWEIS: Bezeichner »pkey_qwat_vl_sia405pt_protection_tube_horizontal_positioning_code« wird auf »pkey_qwat_vl_sia405pt_protection_tube_horizontal_positioning_co« gekürzt

@sjib
Copy link
Author

sjib commented Nov 16, 2024

@kandre There is already a class remote that includes télécommandes:

grafik

Isn't this overlapping the content of cable_de_control à distance?

@sjib
Copy link
Author

sjib commented Nov 16, 2024

grafik

@sjib
Copy link
Author

sjib commented Nov 16, 2024

grafik

@sjib
Copy link
Author

sjib commented Nov 16, 2024

First visualisation protection_tube

test3_karte_protection_tube.pdf

@kandre
Copy link
Contributor

kandre commented Nov 21, 2024

First visualisation protection_tube

test3_karte_protection_tube.pdf

Yes that works for me.

@kandre
Copy link
Contributor

kandre commented Nov 21, 2024

@kandre There is already a class remote that includes télécommandes:

grafik

Isn't this overlapping the content of cable_de_control à distance?

Yes it is overlapping and I think we should deprecated it.

@kandre
Copy link
Contributor

kandre commented Nov 21, 2024

@kandre There is already a class remote that includes télécommandes:
grafik
Isn't this overlapping the content of cable_de_control à distance?

Yes it is overlapping and I think we should deprecated it or replace it.

@sjib
Copy link
Author

sjib commented Nov 22, 2024

    Applying delta 1.4.2 004_add_control_cable... syntax error at or near ":"
LINE 26: ...nt ADD COLUMN geometry3d_geometry geometry('POINTZ', :SRID);

@kandre @ponceta How is the SRID handeled in qwat?

@sjib
Copy link
Author

sjib commented Nov 22, 2024

Try with

	-- Get CRS from qwat_sys.fn_setting_srid function
	sql = format('select qwat_sys.fn_setting_srid();');
	execute sql into crs;

(see https://github.com/qwat/qwat-data-model/blob/master/update/delta/delta_1.4.0_011_search_opened_valves.sql)

@sjib
Copy link
Author

sjib commented Nov 22, 2024

@ponceta I don't know how to add this to a CREATE TABLE qwat_od.sia405cc_cable_point statement. Can you check on that and let me know?

@ponceta
Copy link
Member

ponceta commented Nov 22, 2024

From Copilot :

DO $$
DECLARE
    srid_value INTEGER;
BEGIN
    -- Récupérer la valeur SRID depuis la table qwat_sys.settings
    SELECT value INTO srid_value FROM qwat_sys.settings WHERE name = 'srid';

    -- Construire et exécuter la commande ALTER TABLE avec la valeur SRID récupérée
    EXECUTE format('ALTER TABLE qwat_od.sia405pt_protection_tube ADD COLUMN geometry3d_geometry geometry(''COMPOUNDCURVEZ'', %s)', srid_value);
END $$;

Seems to work as expected. Will maybe be improved in code review.

@sjib
Copy link
Author

sjib commented Nov 22, 2024

@sjib sjib marked this pull request as ready for review November 22, 2024 19:37
@sjib sjib requested review from kandre and ponceta November 22, 2024 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants