feat(): add firstName / lastName to user
update _user
set last_name = split_part(name, ' ', 1), first_name = split_part(name, ' ', -1)
where role in ('MAGISTRATE', 'CLERK', 'ATTACHE', 'ASSISTANT');
select id, name
from _user
where role in ('MAGISTRATE', 'CLERK', 'ATTACHE', 'ASSISTANT')
and name <> concat(last_name, ' ', first_name)
order by id;
update _user set last_name = 'DE BEAUMONT', first_name = 'Evelyne' where id = 545;
update _user set last_name = 'SERVICE EXPERTISE CIVILE', first_name = 'TJ Thionville' where id = 566;
update _user set last_name = 'LE GALL', first_name = 'Chloé' where id = 579;
update _user set last_name = 'LE GALLO', first_name = 'Marie-Ange' where id = 622;
update _user set last_name = 'HENON MERNIER', first_name = 'Marie-Cécile' where id = 630;
update _user set last_name = 'ANTOINE', first_name = 'Anne Sophie' where id = 632;
update _user set last_name = 'KERNALEGUEN', first_name = 'Charlotte' where id = 659;
update _user set last_name = 'GALLOT-LE GRAND', first_name = 'Elodie' where id = 671;
update _user set last_name = 'TRIBUNAL POUR ENFANTS', first_name = 'TPE' where id = 891;
update _user set last_name = 'LE FRIEC', first_name = 'Gwénaëlle' where id = 894;
update _user set last_name = 'LELY', first_name = 'Justine' where id = 918;
update _user set last_name = 'SERVICE', first_name = 'Application des peines' where id = 920;
update _user set last_name = 'VARBANOV', first_name = 'Valérie' where id = 923;
update _user set last_name = 'BROWNE', first_name = 'Annick' where id = 953;
update _user set last_name = 'LE COZ', first_name = 'Charlotte' where id = 968;
update _user set last_name = 'OTT', first_name = 'Florian' where id = 1045;
update _user set last_name = 'DE SEQUEIRA', first_name = 'Didier' where id = 1056;
update _user set last_name = 'DE RUEDA', first_name = 'Estelle' where id = 1085;
update _user set last_name = 'PICOURY', first_name = 'Jennyfer' where id = 1100;
update _user set last_name = 'DIRECTEUR DE GREFFE RESPONSABLE DES SERVICES PÉNAUX', first_name = 'Près la cour d''appel' where id = 1138;
update _user set last_name = 'HARS', first_name = 'Jérôme' where id = 1176;
update _user set last_name = 'COUR D''APPEL', first_name = 'Chambre correctionnelle' where id = 1225;
update _user set last_name = 'COUR D''APPEL', first_name = 'Chambre de l''instruction' where id = 1226;
update _user set last_name = 'COUR D''APPEL', first_name = '1ère chambre civile' where id = 1241;
update _user set last_name = 'COUR D''APPEL', first_name = '2ème chambre civile' where id = 1242;
update _user set last_name = 'COUR D''APPEL', first_name = 'Chambre sociale' where id = 1243;
update _user set last_name = 'LE BRIERE', first_name = 'Mélinda' where id = 1276;
update _user set last_name = 'PAIN', first_name = 'Marie-Caroline' where id = 1325;
update _user set last_name = 'GUYOT', first_name = 'Manuela' where id = 1360;
update _user set last_name = 'FERGANE', first_name = 'Julie' where id = 1361;
update _user set last_name = 'LE GALL', first_name = 'Isabelle' where id = 1366;
update _user set last_name = 'LE PRINCE', first_name = 'Delphine' where id = 1438;
update _user set last_name = 'LE BARS', first_name = 'Justine' where id = 1493;
update _user set last_name = 'DA CUNHA', first_name = 'Tony' where id = 1543;
update _user set last_name = 'PINET LE BRAS', first_name = 'Béatrice' where id = 1572;
update _user set last_name = 'NGUEMA ONDO', first_name = 'Franck' where id = 1578;
update _user set last_name = 'FAYS', first_name = 'Ségolène' where id = 1596;
update _user set last_name = 'LE GOATER', first_name = 'Yannick' where id = 1714;
update _user set last_name = 'DE ROCQUIGNY', first_name = 'Pauline' where id = 1863;
update _user set last_name = 'FADDOUL ÉPOUSE GUYOT', first_name = 'Amal' where id = 1938;
update _user set last_name = 'COLMANT', first_name = 'Elodie' where id = 2175;
Edited by Nicolas Aycirieix