Display sequence inconsistencies in database diagnostics page
What does this MR do and why?
This merge request adds sequence ownership disparities to the database diagnostics page (/admin/database_diagnostics).
- Backend changes: Add details in schema checker inconsistency object
This is needed to provide richer detail as to what is not right with the database. For example, with sequence ownership we want to display the current owner and the expected owner.
This commit bumps the schema checker version from v1 to v2 accordingly.
- Frontend changes: Add frontend support for schema checker subsections
In the database schema monitoring dashboard under the "Sequences", we now have added a subsection that shows incorrect sequence ownership in a table in addition to the missing sequence list.
References
Relates to #396878
Screenshots or screen recordings
How to set up and validate locally
- Check out this branch.
- Run
gdk restart rails - Run
gdk psql - Alter the sequence owner of a random sequence. For example:
ALTER SEQUENCE abuse_report_assignees_id_seq OWNED BY projects.id;
- Click on
Run Schema Check. - You should then see this discrepancy.
- To restore things back:
ALTER SEQUENCE abuse_report_assignees_id_seq OWNED BY abuse_report_assignees.id;
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Stan Hu

