From f3170d0c8733a723cad86daaa2300146bfbd1eb2 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Wed, 8 Mar 2023 17:49:13 +0100 Subject: [PATCH] cleaning --- sql/import.sql | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/sql/import.sql b/sql/import.sql index 8dda47e..aec7a20 100644 --- a/sql/import.sql +++ b/sql/import.sql @@ -3,7 +3,7 @@ -- version v0.6 (== version canevas) -- -- /!\ IMPORTANT --- * Avant de migrer (UP), il faut d'abord importer les codes postaux !!! +-- Avant de migrer (UP), il faut d'abord avoir importé les codes postaux !!! -- @@ -138,7 +138,7 @@ INSERT INTO chill_person_social_issue (id, parent_id, title, ordering) AND parent_id = (SELECT id FROM chill_person_social_issue WHERE title::jsonb = t.parent1)); -- 14. Complete table WorkSocialActions - +-- (not yet implemented in canvas) -- 20. Prepare personnes civility ALTER TABLE import.personnes ADD COLUMN civility1 jsonb; @@ -270,14 +270,13 @@ ALTER TABLE import.personnes ADD column postcode_id BIGINT; UPDATE import.personnes SET postcode_id = cmpc.id FROM chill_main_postal_code cmpc WHERE cmpc.code = postcode AND cmpc.origin = 0; INSERT INTO chill_main_address (id, postcode_id, street, streetnumber, extra, validFrom) SELECT address_id, postcode_id, street, streetnumber, extra, CURRENT_DATE -FROM import.personnes WHERE postcode_id IS NOT NULL; - - - --- ajouter dans chill_person_accompanying_course + FROM import.personnes WHERE postcode_id IS NOT NULL; +SELECT ip.person_id, ip.address_id FROM import.personnes ip ; +-- SELECT ip.id, ip.person_id, ip.firstname, ip.lastname, addr.* FROM chill_main_address addr RIGHT JOIN import.personnes ip ON addr.id = ip.address_id ORDER BY ip.id; +-- ========================================================================================= -- -- -- DOWN