What does this MR do?
Confirms the schema_migrations
table exists before running truncate.
Are there points in the code the reviewer needs to double check?
Why was this MR needed?
Restoring a GitLab backup to an empty MySQL database fails with:
ActiveRecord::StatementInvalid: Mysql2::Error: Table 'gitlab.schema_migrations' doesn't exist: TRUNCATE schema_migrations
Example at: ZD: https://gitlab.zendesk.com/agent/tickets/35466
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
CHANGELOG entry added -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if you do - rebase it please) -
Squashed related commits together