Skip to content

Finalize BackupAndRemoveNotesWithNullNoteableType and remove temp_notes_backup

  • Finalize the batched background migration BackupAndRemoveNotesWithNullNoteableType introduced in !146023 (merged).

%17.0 has been assigned since the BBM should not take more than a milestone to complete. Be sure to check its status before proceeding.

The next required stop as of this writing is 16.11 #440234 (closed). Although the number of the orphaned records in the production DB is small (~1.6k), the notes table itself is quite large and the BBM should be finalized in 17.0 after the next required stop.

After finalizing the BBM, make sure to validate the check constraint check_1244cbd7d0 that prevents NULL noteable_type. The constraint was added in !143918 (merged) without validation.

  • validate the check constraint check_1244cbd7d0 that prevents NULL noteable_type - !154312 (merged)

We also need to remove a temp index that was introduced to run the background migration

Finally remove the temp_notes_backup table ONLY IF no user has reported missing notes. The table was created in !146023 (merged) to temporarily store the removed orphaned records to guard against unintended data loss.

Edited by Mario Celi