Skip to content

Commit

Permalink
Merge pull request #238 from QGEP/2024-08-22-rename-mutation.system-u…
Browse files Browse the repository at this point in the history
…ser-to-avoid-postgres-confllicts

2024 08 22 rename mutation.system user to avoid postgres confllicts
  • Loading branch information
ponceta authored Aug 26, 2024
2 parents aa5eac6 + 5d5c533 commit 10851f7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
4 changes: 2 additions & 2 deletions 03_qgep_db_dss.sql
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ ALTER TABLE qgep_od.mutation ADD COLUMN recorded_by varchar(80) ;
COMMENT ON COLUMN qgep_od.mutation.recorded_by IS 'Name of person who recorded the dataset / Name des Aufnehmers im Feld / Nom de la personne, qui a relevé les données';
ALTER TABLE qgep_od.mutation ADD COLUMN remark varchar(80) ;
COMMENT ON COLUMN qgep_od.mutation.remark IS 'General remarks / Allgemeine Bemerkungen / Remarques générales';
ALTER TABLE qgep_od.mutation ADD COLUMN system_user varchar(20) ;
COMMENT ON COLUMN qgep_od.mutation.system_user IS 'Name of system user / Name des Systembenutzers / Usager du système informatique';
ALTER TABLE qgep_od.mutation ADD COLUMN user_system varchar(20) ;
COMMENT ON COLUMN qgep_od.mutation.user_system IS 'Name of system user / Name des Systembenutzers / Usager du système informatique';
ALTER TABLE qgep_od.mutation ADD COLUMN last_modification TIMESTAMP without time zone DEFAULT now();
COMMENT ON COLUMN qgep_od.mutation.last_modification IS 'Last modification / Letzte_Aenderung / Derniere_modification: INTERLIS_1_DATE';
ALTER TABLE qgep_od.mutation ADD COLUMN fk_dataowner varchar(16);
Expand Down
2 changes: 1 addition & 1 deletion 09_qgep_dictionaries.sql
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@ CREATE TABLE qgep_sys.dictionary_od_field (
INSERT INTO qgep_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (9998,5514,'mutation','object','object','OBJEKT','OBJET','oggetto','obiect','OBJ_ID of Object','OBJ_ID des Objektes','OBJ_ID de l''objet','NULL','',ARRAY['kein_Plantyp_definiert']::qgep_od.plantype[],'true','varchar(20)','','','','','','','','','','',NULL,NULL);
INSERT INTO qgep_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (9998,5528,'mutation','recorded_by','recorded_by','AUFNEHMER','RELEVE_PAR','zzz_AUFNEHMER','înregistrat_de','Name of person who recorded the dataset','Name des Aufnehmers im Feld','Nom de la personne, qui a relevé les données','NULL','',ARRAY['kein_Plantyp_definiert']::qgep_od.plantype[],'true','varchar(80)','','','','','','','','','','',NULL,NULL);
INSERT INTO qgep_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (9998,5534,'mutation','remark','remark','BEMERKUNG','REMARQUE','osservazione','observa?ie','General remarks','Allgemeine Bemerkungen','Remarques générales','NULL','',ARRAY['kein_Plantyp_definiert']::qgep_od.plantype[],'true','varchar(80)','','','','','','','','','','',NULL,NULL);
INSERT INTO qgep_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (9998,5532,'mutation','system_user','system_user','SYSTEMBENUTZER','USAGER_SYSTEME','zzz_SYSTEMBENUTZER','utilizatorul_din_sistem','Name of system user','Name des Systembenutzers','Usager du système informatique','NULL','',ARRAY['kein_Plantyp_definiert']::qgep_od.plantype[],'true','varchar(20)','','','','','','','','','','',NULL,NULL);
INSERT INTO qgep_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (9998,5532,'mutation','user_system','user_system','SYSTEMBENUTZER','USAGER_SYSTEME','zzz_SYSTEMBENUTZER','utilizatorul_din_sistem','Name of system user','Name des Systembenutzers','Usager du système informatique','NULL','',ARRAY['kein_Plantyp_definiert']::qgep_od.plantype[],'true','varchar(20)','','','','','','','','','','',NULL,NULL);
INSERT INTO qgep_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (9998,999999,'mutation','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID','OBJ_ID - Unique ID','OBJ_ID - eindeutige Kennung','OBJ_ID - ID unique','OBJ_ID - identificatore univoco','rrr_OBJ_ID - eindeutige Kennung',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qgep_od.plantype[],'true','varchar(16)','','','','','','','','','','',NULL,NULL);
INSERT INTO qgep_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (9998,999999,'mutation','dataowner','dataowner','Datenherr','MAITRE_DES_DONNEES','proprietario_dati','rrr_Datenherr','dataowner - this is the person or body who is allowed to delete, change or maintain this object','Metaattribut Datenherr ist diejenige Person oder Stelle, die berechtigt ist, diesen Datensatz zu löschen, zu ändern bzw. zu verwalten','Maître des données gestionnaire de données, qui est la personne ou l''organisation autorisée pour gérer, modifier ou supprimer les données de cette table/classe','zzz_Metaattribut L''attributo proprietario dati si riferisce alla persona o ente che è autorizzato a eliminare, modificare o gestire i dati','rrr_Metaattribut Datenherr ist diejenige Person oder Stelle, die berechtigt ist, diesen Datensatz zu löschen, zu ändern bzw. zu verwalten',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qgep_od.plantype[],'true','varchar(80)','','','','','','','','','','',NULL,NULL);
INSERT INTO qgep_sys.dictionary_od_field (class_id, attribute_id, table_name, field_name, field_name_en, field_name_de, field_name_fr, field_name_it, field_name_ro, field_description_en, field_description_de, field_description_fr, field_description_it, field_description_ro, field_mandatory, field_visible, field_datatype, field_unit_en, field_unit_description_en, field_unit_de, field_unit_description_de, field_unit_fr, field_unit_description_fr, field_unit_it, field_unit_description_it, field_unit_ro, field_unit_description_ro, field_max, field_min) VALUES (9998,999999,'mutation','provider','provider','Datenlieferant','FOURNISSEUR_DES_DONNEES','fornitore_dati','rrr_Datenlieferant','Metaattribute provider - this is the person or body who delivered the data','Metaattribut Datenlieferant ist diejenige Person oder Stelle, die die Daten geliefert hat','FOURNISSEUR DES DONNEES Organisation qui crée l’enregistrement de ces données','zzz_Metaattribut L''attributo fornitore dati si riferisce alla persona o ente che ha fornito i dati','rrr_Metaattribut Datenlieferant ist diejenige Person oder Stelle, die die Daten geliefert hat',ARRAY['Werkinformation','Leitungskataster', 'GEP_Verband','GEP_Traegerschaft','SAA', 'PAA']::qgep_od.plantype[],'true','varchar(80)','','','','','','','','','','',NULL,NULL);
Expand Down
11 changes: 11 additions & 0 deletions delta/delta_1.6.2_dss_rename_system_user.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
-- noop delta, used only to unambigously define the datamodel version
ALTER TABLE qgep_od.mutation
RENAME COLUMN system_user to user_system;

UPDATE qgep_sys.dictionary_od_field
SET field_name = 'user_system'
WHERE attribute_id = 5532;

UPDATE qgep_sys.dictionary_od_field
SET field_name_en = 'user_system'
WHERE attribute_id = 5532;

0 comments on commit 10851f7

Please sign in to comment.