Filter out notes with noteable_id pointing to inexistent records
Notes table uses polymorphism to relate notes to different models: issues, merge requests, epics, designs, snippets, etc. Because of polymorphism we cannot have a DB level FK, which inevitably leads to some data inconsistency at DB level, which should be accounted for in code and migrations.
Showing
Please register or sign in to comment