FixTask00050FixInodesWithoutContentlets - Bad SQL
Tested on a client database (postgreSQL) right after their upgrade from 3.2 to 3.6. Not happening when upgrading from 3.2 to 3.5.
Full error can be found here: https://gist.github.com/gabbydotCMS/da3ad2bd5a8826d6e15c49a9dc9363b2#file-fix-assets-inconsistencies-errors-L233
I can provide the database dump to reproduce the issue.
PR: https://github.com/dotCMS/core/pull/9970
Passed QA. Executed Fix Assets Inconsistencies tool and verified that task successfully fixed assets by running the queries provided by @gabbydotCMS:
- select count(inode) from inode i where type = 'contentlet' and not exists (select 1 from contentlet where i.inode = inode)
- select count(id) from identifier i where asset_type = 'contentlet' and not exists (select 1 from contentlet where i.id = identifier)
Assets count after task returns 0
Tested in latest master-3.7 and 3.7 distribution using a Postgres DB coming from a dotCMS 3.2 instance
port to new 3.7
Merged to 3.7 https://github.com/dotCMS/core/pull/10415