fixed migrations bug from issue #1829, down migrations now operate only on completed migrations