Where can I see the database upgrade script?
There are a number of other threads around this issue and you may find the specific advice you need if you read through them eg

How to find and/or fix missing indices?

or this one

Missing indices status after upgrading to CiviCRM 4.7.21 on WordPress 4.8