How to create composite index on multiple columns in Frappe/Erpnext

How do we create composite index on multiple columns in Frappe/Erpnext. For individual fields in the Doctype, we can create the index. However, if we want to create a composite index based on more than one field, how do we create the same?

It will need to be directly on the database

Also, you can use the hook after_install to create the hook when the app is installed.

Also, the index can be created using patches are skipped when they you install the app, so that’s why after_install is also needed

Thank you… We can even use after_migrate hook it seems… Will that be fine?