Finalize BackupAndRemoveNotesWithNullNoteableType and remove temp_notes_backup
-
Finalize the batched background migration BackupAndRemoveNotesWithNullNoteableTypeintroduced 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_1244cbd7d0that preventsNULLnoteable_type- !154312 (merged)
We also need to remove a temp index that was introduced to run the background migration
-
Drop temp_index_on_notes_with_null_noteable_typeindex - !154831 (merged)
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.
-
remove the temp_notes_backuptable - !154317 (merged)