From fb26e3d892b71a4e4b319a89b1be02840ae25d94 Mon Sep 17 00:00:00 2001 From: Daniel Lockyer Date: Tue, 2 Feb 2021 10:24:49 +0000 Subject: [PATCH] Updated migrations test to rollback to different versions no issue - in 4.0, we don't expect to rollback to 3.0 because there are irreversible migrations - the existing test attempts to do this because it was written for v3 - this commit updates the test to apply to v4, although this will need to change soon when we switch branches --- .github/workflows/test.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4252c3ef44..d262c87d8b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -66,7 +66,13 @@ jobs: - run: | node index.js & sleep 20 && { kill $! && wait $!; } 2>/dev/null + + - run: yarn knex-migrator rollback --v 4.0 --force + if: github.ref == 'refs/heads/4.0' + - run: yarn knex-migrator rollback --v 3.0 --force + if: github.ref == 'refs/heads/master' + - run: yarn knex-migrator migrate --force test: