Fixed #21477 -- Renamed db to using in pre/post_migrate signals.