From d3651d30fe37c94bd1e6554baf448f03f4ae70dc Mon Sep 17 00:00:00 2001 From: srosse <none@none> Date: Thu, 17 May 2018 17:01:04 +0200 Subject: [PATCH] OO-3477: update statement for PosstreSQL, MySQL and Oracle --- .../database/mysql/alter_12_4_x_to_12_5_0.sql | 140 ++++++++--------- .../oracle/alter_12_4_x_to_12_5_0.sql | 141 +++++++++--------- .../postgresql/alter_12_4_x_to_12_5_0.sql | 140 ++++++++--------- 3 files changed, 211 insertions(+), 210 deletions(-) diff --git a/src/main/resources/database/mysql/alter_12_4_x_to_12_5_0.sql b/src/main/resources/database/mysql/alter_12_4_x_to_12_5_0.sql index 672354a9e01..6b530fca0c2 100644 --- a/src/main/resources/database/mysql/alter_12_4_x_to_12_5_0.sql +++ b/src/main/resources/database/mysql/alter_12_4_x_to_12_5_0.sql @@ -2,73 +2,73 @@ alter table o_loggingtable drop username, drop userproperty1, drop userproperty2 update o_bs_identity set name=id where status=199; -update o_user set u_firstname=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_lastname=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_email=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_birthday=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_graduation=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_gender=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_telprivate=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_telmobile=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_teloffice=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_skype=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_msn=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_xing=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_icq=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_homepage=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_street=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_extendedaddress=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_pobox=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_zipcode=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_region=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_city=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_country=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_countrycode=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_institutionalname=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_institutionaluseridentifier=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_institutionalemail=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_orgunit=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_studysubject=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_emchangekey=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_emaildisabled=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_typeofuser=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_socialsecuritynumber=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_genericselectionproperty=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_genericselectionproperty2=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_genericselectionproperty3=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_generictextproperty=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_generictextproperty2=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_generictextproperty3=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_generictextproperty4=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_generictextproperty5=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_genericuniquetextproperty=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_genericuniquetextproperty2=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_genericuniquetextproperty3=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_genericemailproperty1=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_genericcheckboxproperty=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_genericcheckboxproperty2=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_genericcheckboxproperty3=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_rank=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_degree=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_position=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_userinterests=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_usersearchedinterests=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_officestreet=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_extendedofficeaddress=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_officepobox=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_officezipcode=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_officecity=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_officecountry=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_officemobilephone=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_department=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_privateemail=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_edupersonaffiliation=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_swissedupersonhomeorg=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_swissedupersonstudylevel=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_swissedupersonhomeorgtype=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_employeenumber=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_swissedupersonstaffcategory=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_organizationalunit=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_swissedupersonstudybranch1=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_swissedupersonstudybranch2=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_swissedupersonstudybranch3=null from o_bs_identity where user_id=fk_user_id and status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_firstname=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_lastname=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_email=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_birthday=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_graduation=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_gender=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_telprivate=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_telmobile=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_teloffice=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_skype=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_msn=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_xing=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_icq=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_homepage=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_street=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_extendedaddress=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_pobox=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_zipcode=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_region=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_city=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_country=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_countrycode=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_institutionalname=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_institutionaluseridentifier=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_institutionalemail=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_orgunit=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_studysubject=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_emchangekey=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_emaildisabled=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_typeofuser=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_socialsecuritynumber=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_genericselectionproperty=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_genericselectionproperty2=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_genericselectionproperty3=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_generictextproperty=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_generictextproperty2=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_generictextproperty3=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_generictextproperty4=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_generictextproperty5=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_genericuniquetextproperty=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_genericuniquetextproperty2=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_genericuniquetextproperty3=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_genericemailproperty1=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_genericcheckboxproperty=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_genericcheckboxproperty2=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_genericcheckboxproperty3=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_rank=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_degree=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_position=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_userinterests=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_usersearchedinterests=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_officestreet=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_extendedofficeaddress=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_officepobox=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_officezipcode=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_officecity=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_officecountry=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_officemobilephone=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_department=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_privateemail=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_edupersonaffiliation=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_swissedupersonhomeorg=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_swissedupersonstudylevel=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_swissedupersonhomeorgtype=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_employeenumber=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_swissedupersonstaffcategory=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_organizationalunit=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_swissedupersonstudybranch1=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_swissedupersonstudybranch2=null where status=199; +update o_user inner join o_bs_identity on (id=fk_identity) set u_swissedupersonstudybranch3=null where status=199; diff --git a/src/main/resources/database/oracle/alter_12_4_x_to_12_5_0.sql b/src/main/resources/database/oracle/alter_12_4_x_to_12_5_0.sql index 43615f3d53c..89a8074b5fb 100644 --- a/src/main/resources/database/oracle/alter_12_4_x_to_12_5_0.sql +++ b/src/main/resources/database/oracle/alter_12_4_x_to_12_5_0.sql @@ -2,73 +2,74 @@ alter table o_loggingtable drop (username, userproperty1, userproperty2, userpro update o_bs_identity set name=id where status=199; -update o_user set u_firstname=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_lastname=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_email=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_birthday=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_graduation=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_gender=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_telprivate=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_telmobile=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_teloffice=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_skype=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_msn=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_xing=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_icq=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_homepage=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_street=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_extendedaddress=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_pobox=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_zipcode=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_region=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_city=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_country=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_countrycode=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_institutionalname=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_institutionaluseridentifier=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_institutionalemail=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_orgunit=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_studysubject=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_emchangekey=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_emaildisabled=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_typeofuser=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_socialsecuritynumber=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_genericselectionproperty=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_genericselectionproperty2=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_genericselectionproperty3=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_generictextproperty=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_generictextproperty2=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_generictextproperty3=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_generictextproperty4=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_generictextproperty5=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_genericuniquetextproperty=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_genericuniquetextproperty2=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_genericuniquetextproperty3=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_genericemailproperty1=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_genericcheckboxproperty=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_genericcheckboxproperty2=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_genericcheckboxproperty3=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_rank=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_degree=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_position=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_userinterests=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_usersearchedinterests=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_officestreet=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_extendedofficeaddress=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_officepobox=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_officezipcode=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_officecity=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_officecountry=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_officemobilephone=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_department=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_privateemail=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_edupersonaffiliation=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_swissedupersonhomeorg=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_swissedupersonstudylevel=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_swissedupersonhomeorgtype=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_employeenumber=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_swissedupersonstaffcategory=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_organizationalunit=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_swissedupersonstudybranch1=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_swissedupersonstudybranch2=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_swissedupersonstudybranch3=null from o_bs_identity where user_id=fk_user_id and status=199; +update o_user set u_firstname=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_firstname=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_lastname=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_email=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_birthday=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_graduation=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_gender=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_telprivate=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_telmobile=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_teloffice=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_skype=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_msn=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_xing=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_icq=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_homepage=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_street=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_extendedaddress=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_pobox=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_zipcode=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_region=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_city=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_country=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_countrycode=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_institutionalname=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_institutionaluseridentifier=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_institutionalemail=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_orgunit=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_studysubject=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_emchangekey=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_emaildisabled=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_typeofuser=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_socialsecuritynumber=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_genericselectionproperty=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_genericselectionproperty2=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_genericselectionproperty3=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_generictextproperty=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_generictextproperty2=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_generictextproperty3=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_generictextproperty4=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_generictextproperty5=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_genericuniquetextproperty=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_genericuniquetextproperty2=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_genericuniquetextproperty3=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_genericemailproperty1=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_genericcheckboxproperty=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_genericcheckboxproperty2=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_genericcheckboxproperty3=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_rank=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_degree=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_position=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_userinterests=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_usersearchedinterests=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_officestreet=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_extendedofficeaddress=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_officepobox=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_officezipcode=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_officecity=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_officecountry=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_officemobilephone=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_department=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_privateemail=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_edupersonaffiliation=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_swissedupersonhomeorg=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_swissedupersonstudylevel=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_swissedupersonhomeorgtype=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_employeenumber=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_swissedupersonstaffcategory=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_organizationalunit=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_swissedupersonstudybranch1=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_swissedupersonstudybranch2=null where exists (select id from o_bs_identity where id=fk_identity and status=199); +update o_user set u_swissedupersonstudybranch3=null where exists (select id from o_bs_identity where id=fk_identity and status=199); diff --git a/src/main/resources/database/postgresql/alter_12_4_x_to_12_5_0.sql b/src/main/resources/database/postgresql/alter_12_4_x_to_12_5_0.sql index 33b8ab7797c..1745ccee7d6 100644 --- a/src/main/resources/database/postgresql/alter_12_4_x_to_12_5_0.sql +++ b/src/main/resources/database/postgresql/alter_12_4_x_to_12_5_0.sql @@ -2,73 +2,73 @@ alter table o_loggingtable drop column username, drop column userproperty1, drop update o_bs_identity set name=id where status=199; -update o_user set u_firstname=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_lastname=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_email=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_birthday=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_graduation=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_gender=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_telprivate=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_telmobile=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_teloffice=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_skype=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_msn=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_xing=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_icq=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_homepage=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_street=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_extendedaddress=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_pobox=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_zipcode=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_region=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_city=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_country=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_countrycode=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_institutionalname=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_institutionaluseridentifier=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_institutionalemail=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_orgunit=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_studysubject=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_emchangekey=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_emaildisabled=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_typeofuser=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_socialsecuritynumber=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_genericselectionproperty=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_genericselectionproperty2=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_genericselectionproperty3=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_generictextproperty=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_generictextproperty2=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_generictextproperty3=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_generictextproperty4=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_generictextproperty5=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_genericuniquetextproperty=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_genericuniquetextproperty2=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_genericuniquetextproperty3=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_genericemailproperty1=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_genericcheckboxproperty=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_genericcheckboxproperty2=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_genericcheckboxproperty3=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_rank=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_degree=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_position=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_userinterests=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_usersearchedinterests=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_officestreet=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_extendedofficeaddress=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_officepobox=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_officezipcode=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_officecity=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_officecountry=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_officemobilephone=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_department=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_privateemail=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_edupersonaffiliation=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_swissedupersonhomeorg=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_swissedupersonstudylevel=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_swissedupersonhomeorgtype=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_employeenumber=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_swissedupersonstaffcategory=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_organizationalunit=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_swissedupersonstudybranch1=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_swissedupersonstudybranch2=null from o_bs_identity where user_id=fk_user_id and status=199; -update o_user set u_swissedupersonstudybranch3=null from o_bs_identity where user_id=fk_user_id and status=199; +update o_user set u_firstname=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_lastname=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_email=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_birthday=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_graduation=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_gender=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_telprivate=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_telmobile=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_teloffice=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_skype=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_msn=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_xing=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_icq=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_homepage=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_street=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_extendedaddress=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_pobox=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_zipcode=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_region=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_city=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_country=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_countrycode=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_institutionalname=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_institutionaluseridentifier=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_institutionalemail=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_orgunit=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_studysubject=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_emchangekey=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_emaildisabled=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_typeofuser=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_socialsecuritynumber=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_genericselectionproperty=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_genericselectionproperty2=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_genericselectionproperty3=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_generictextproperty=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_generictextproperty2=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_generictextproperty3=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_generictextproperty4=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_generictextproperty5=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_genericuniquetextproperty=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_genericuniquetextproperty2=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_genericuniquetextproperty3=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_genericemailproperty1=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_genericcheckboxproperty=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_genericcheckboxproperty2=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_genericcheckboxproperty3=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_rank=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_degree=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_position=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_userinterests=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_usersearchedinterests=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_officestreet=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_extendedofficeaddress=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_officepobox=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_officezipcode=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_officecity=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_officecountry=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_officemobilephone=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_department=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_privateemail=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_edupersonaffiliation=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_swissedupersonhomeorg=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_swissedupersonstudylevel=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_swissedupersonhomeorgtype=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_employeenumber=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_swissedupersonstaffcategory=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_organizationalunit=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_swissedupersonstudybranch1=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_swissedupersonstudybranch2=null from o_bs_identity where id=fk_identity and status=199; +update o_user set u_swissedupersonstudybranch3=null from o_bs_identity where id=fk_identity and status=199; -- GitLab