Move queries to new migration script (#4012)

Iterate over empty array if no query result
Switch compose back to master
Only remove index if no pk
Remove drop indices
Only person_id changes in this migration
Do not name primary key
This commit is contained in:
Internal Server Error - Gitea: Git with a cup of tea
500 Internal Server Error

Gitea Version: 1.28.0+dev-477-g8b6ad49a5f