How to Uninstall HRMS App without losing data

Hi,

Is there any command to re-install an app ? Or to uninstall without deleting database tables ? This is necessary to resolve issues around logic that is triggered during App Install/Uninstall… We are faced with one such issue currently (the HRMS app) and urgently need a solution

Thanks

@wale Uninstall only trigger wiping database tables for that particular app only

Hi @Hardik_Gadesha , thanks for your response. The app in question here is the hrms app so you can imagine that wiping the database tables is a big issue !

Oh yeah, is there any issue which is in your system right now which leads you to uninstall app ?

Yes ! There are a number of fields that are supposed to be automatically created on install of the HRMS app. The creation of these fields failed for whatever reason. Now the Employee form is not getting saved because of one of these missing fields and there are other issues in other places as well because these fields are required for proper functioning of the HR/Payroll modules

@wale this fields are created from patch execution and this only gets executed once.

you can try to re-execute it from your bench itself

bench --site yoursitename execute hrms.patches.v1_0.rearrange_employee_fields.execute
bench --site yoursitename execute hrms.patches.v14_0.create_custom_field_in_loan.execute

same way other patch you can find here https://github.com/frappe/hrms/blob/version-14/hrms/patches.txt

Give it a try ! this might fix your field creation issue

Wow! @Hardik_Gadesha Thank you sooo much ! This has fixed the issue

Much appreciated