Skip to content

Validate notes.noteable_type NOT NULL constraint SYNC

Mario Celi requested to merge 443667-validate-constraint-sync into master

What does this MR do and why?

Validation was already run during the weekend in .com with !153029 (merged). Adding the sync migration with the db/structure.sql changes

DB review

Console output

UP

bin/rails db:migrate
main: == [advisory_lock_connection] object_id: 125740, pg_backend_pid: 345
main: == 20240527204206 ValidateNotesNoteableTypeNotNullConstraint: migrating =======
main: -- execute("SET statement_timeout TO 0")
main:    -> 0.0002s
main: -- execute("ALTER TABLE notes VALIDATE CONSTRAINT check_1244cbd7d0;")
main:    -> 0.0003s
main: -- execute("RESET statement_timeout")
main:    -> 0.0001s
main: == 20240527204206 ValidateNotesNoteableTypeNotNullConstraint: migrated (0.0163s)

main: == [advisory_lock_connection] object_id: 125740, pg_backend_pid: 345
ci: == [advisory_lock_connection] object_id: 125980, pg_backend_pid: 349
ci: == 20240527204206 ValidateNotesNoteableTypeNotNullConstraint: migrating =======
ci: -- execute("SET statement_timeout TO 0")
ci:    -> 0.0002s
ci: -- execute("ALTER TABLE notes VALIDATE CONSTRAINT check_1244cbd7d0;")
ci:    -> 0.0003s
ci: -- execute("RESET statement_timeout")
ci:    -> 0.0001s
ci: == 20240527204206 ValidateNotesNoteableTypeNotNullConstraint: migrated (0.0075s)

ci: == [advisory_lock_connection] object_id: 125980, pg_backend_pid: 349

DOWN

bin/rails db:rollback:main db:rollback:ci
main: == [advisory_lock_connection] object_id: 125320, pg_backend_pid: 99538
main: == 20240527204206 ValidateNotesNoteableTypeNotNullConstraint: reverting =======
main: == 20240527204206 ValidateNotesNoteableTypeNotNullConstraint: reverted (0.0028s)

main: == [advisory_lock_connection] object_id: 125320, pg_backend_pid: 99538
ci: == [advisory_lock_connection] object_id: 125960, pg_backend_pid: 99786
ci: == 20240527204206 ValidateNotesNoteableTypeNotNullConstraint: reverting =======
ci: == 20240527204206 ValidateNotesNoteableTypeNotNullConstraint: reverted (0.0061s)

ci: == [advisory_lock_connection] object_id: 125960, pg_backend_pid: 99786

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.

Related to #443667 (closed)

Edited by Mario Celi

Merge request reports