(core) repair a migration test when running against postgres

Summary:
This is fixing some fall-out from some environmental changes after
another batch of tests were moved to grist-core.

Test Plan: this is fixing a test, no app changes

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D4156
dependabot/npm_and_yarn/follow-redirects-1.15.4
Paul Fitzpatrick 5 months ago
parent 2a206dfcf8
commit 15a73fdaf0

@ -79,6 +79,13 @@ describe('migrations', function() {
beforeEach(async function() {
await home.connect();
// If testing against postgres, remove all tables.
// If SQLite, we're using a fresh in-memory db each time.
const sqlite = home.connection.driver.options.type === 'sqlite';
if (!sqlite) {
await home.connection.query('DROP SCHEMA public CASCADE');
await home.connection.query('CREATE SCHEMA public');
}
await createInitialDb(home.connection, false);
});

Loading…
Cancel
Save