Run migrations tests in dedicated jobs
What does this MR do?
- This makes the migration tests run in dedicated jobs instead of being spread among the
unit
test jobs. - If any table has more than 1200 columns (including the dropped ones), we drop and re-create the database. Note that we only do that in
config.append_after(:context, :migration)
because that's in these kind of tests that the problem occurs.
Does this MR meet the acceptance criteria?
This seems to work pretty well (e.g. https://gitlab.com/gitlab-org/gitlab/-/jobs/364075812):
2227 The application_settings has 1246 columns.
2228 Recreating the database to reset the 'application_settings' columns count
2229 Dropped database 'gitlabhq_test'
2230 Created database 'gitlabhq_test'
[...]
3723 Schema re-creation done in 4.23490946999982
Conformity
-
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Closes #36715 (closed), #37417 (closed).
Edited by Rémy Coutable