1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-09 00:18:00 +01:00

fix: DROP schema before create

This commit is contained in:
Ivar Conradi Østhus 2020-12-22 10:39:50 +01:00
parent cdfba8f7b1
commit 834010982e

View File

@ -76,6 +76,7 @@ module.exports = async function init(databaseSchema = 'test', getLogger) {
const db = createDb(options);
const eventBus = new EventEmitter();
await db.raw(`DROP SCHEMA IF EXISTS ${options.databaseSchema} CASCADE`);
await db.raw(`CREATE SCHEMA IF NOT EXISTS ${options.databaseSchema}`);
await migrator(options);
await db.destroy();