run down migration actions in reverse order, and fix script for up migration