I know the core used the OCC command db:add-missing-indices
to add indices for tables as this might take quite some time and timeout on regular HTTP requests.
When looking at app development, adding indices can obviously be done in a classical migration or a repair step. I do not know if one can as well hook somehow into the db:add-missing-indices
invocation.
What is the suggested/recommended way to add indices for an app?