Legacy Background Migration allows creation even if migration class does not exist
During a routine migration squash, a rake task I use to automate the process deleted a class used in a squashed legacy background migration. However, this class was necessary for a future background migration, and all of the pipelines passed. This means that the background migration library will happily enqueue a migration even if the class doesn't exist.
An error would not have been detected until a worker actually tried to run the migration in a subsequent install of Gitlab.
The fix is simple - we should raise an error if the class doesn't exist.
Reference: !116021 (comment 1350310738)