Files
0k-odoo-upgrade/scripts
Stéphan Sainléger 1d75a0f9db [CLN] finalize_db: purge `ir.ui.view images orphaned and unreferenced in any arch_db`
Delete image attachments linked to deleted ``ir.ui.view`` records only when
no other view's HTML references them via ``/web/image/<id>`` or
``/web/content/<id>``.  This avoids the aggressive approach of deleting all
``res_id = 0`` attachments, which can break website images that survived
their parent view's deletion but are still embedded in live pages.

The ``NOT EXISTS`` subquery scans all ``arch_db`` columns and is expensive
but runs once at migration time.
2026-08-11 09:52:51 +02:00
..