Close db connection when migration already queued.