diff --git a/update/database/mysql/5.4/dbupdate-5.3.0-to-5.4.0.sql b/update/database/mysql/5.4/dbupdate-5.3.0-to-5.4.0.sql index ba59b796eb5..0d7beb0537c 100644 --- a/update/database/mysql/5.4/dbupdate-5.3.0-to-5.4.0.sql +++ b/update/database/mysql/5.4/dbupdate-5.3.0-to-5.4.0.sql @@ -16,3 +16,6 @@ WHERE ezcontentclass_attribute.id = ezinfocollection_attribute.contentclass_attribute_id AND ezinfocollection_attribute.data_int = 0 AND ezcontentclass_attribute.data_type_string IN ( 'ezdate', 'ezdatetime' ); + +-- See https://jira.ez.no/browse/EZP-23595 - cleanup extra lines in the ezuser_setting table +DELETE FROM ezuser_setting where user_id not in (SELECT contentobject_id FROM ezuser); diff --git a/update/database/postgresql/5.4/dbupdate-5.3.0-to-5.4.0.sql b/update/database/postgresql/5.4/dbupdate-5.3.0-to-5.4.0.sql index 8ce9f365355..d8af310caac 100644 --- a/update/database/postgresql/5.4/dbupdate-5.3.0-to-5.4.0.sql +++ b/update/database/postgresql/5.4/dbupdate-5.3.0-to-5.4.0.sql @@ -15,4 +15,7 @@ FROM ezcontentclass_attribute WHERE ezcontentclass_attribute.id = ezinfocollection_attribute.contentclass_attribute_id AND ezinfocollection_attribute.data_int = 0 - AND ezcontentclass_attribute.data_type_string IN ( 'ezdate', 'ezdatetime' ); \ No newline at end of file + AND ezcontentclass_attribute.data_type_string IN ( 'ezdate', 'ezdatetime' ); + +-- See https://jira.ez.no/browse/EZP-23595 - cleanup extra lines in the ezuser_setting table +DELETE FROM ezuser_setting where user_id not in (SELECT contentobject_id FROM ezuser);