Database migrations runs with a warning: `sha_attribute :verification_checksum is invalid`

Summary

Database migrations runs with a warning: sha_attribute :verification_checksum is invalid.

Steps to reproduce

Trigger the DB migration script, for example, by running $ gdk update:

What is the current bug behavior?

The following warning is shown: WARNING: sha_attribute :verification_checksum is invalid since the table doesn't exist - you may need to run database migrations

------------------------------------------------------------
Processing gitlab-org/gitlab Rails DB migrations
------------------------------------------------------------
WARNING: sha_attribute :verification_checksum is invalid since the table doesn't exist - you may need to run database migrations
== 20200724100123 AddIndexOnVulnerabilityHistoricalStatisticsDate: migrating ==
-- transaction_open?()
   -> 0.0000s
-- index_exists?(:vulnerability_historical_statistics, [:date, :id], {:algorithm=>:concurrently})
   -> 0.0020s
-- add_index(:vulnerability_historical_statistics, [:date, :id], {:algorithm=>:concurrently})
   -> 0.0197s
== 20200724100123 AddIndexOnVulnerabilityHistoricalStatisticsDate: migrated (0.0220s) 

What is the expected correct behavior?

Migrations run without warnings.

Relevant logs and/or screenshots

Multiple migration files are left-over during the migration:

Output of checks

(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)

Results of GitLab environment info

Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

(If you can, link to the line of code that might be responsible for the problem)

Edited by Miguel Rincon