Fix regenerate-schema for partitioned tables
What does this MR do and why?
This MR attempts to fix inconsistency between ./script/regenerate-schema
and db:check-migrations
CI job, which uses scripts/migration_schema_validator.rb
.
Problem: In Add Zoekt::Task model (!143063 - merged) we've discovered that structure.sql generated by ./script/regenerate-schema
causes failures in db:check-migrations
https://gitlab.com/gitlab-org/gitlab/-/jobs/6184997545
The main difference between these scripts is that ./script/regenerate-schema
uses only db:migrate
, when scripts/migration_schema_validator.rb
performs db:schema:dump
after db:migrate
.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.