fix: Bypass ORM for removing apps from installed_apps list (bp #10664) (#10685)
fix: Bypass ORM for removing apps from installed_apps list (bp #10664) (#10685)

Scenario:
a site (on older version) has a custom app xyz installed.
this site is to be restored on a new bench (without xyz) and migrated to recent version.

Problem:
`bench migrate` fails because xyz is not available.
`bench remove-from-installed-apps` might fail, because code is not compatible with the database.

(cherry picked from commit 8c4a85d13f0630953c137afb5e740c45d93f4285)

Co-authored-by: Aditya Hase <5d1852d43efe8f6e393448a3b4d1cd98a4cfd56f@adityahase.com>
vjFaLk/frappe,vjFaLk/frappe,vjFaLk/frappe,vjFaLk/frappe