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:
parent
cdfba8f7b1
commit
834010982e
@ -76,6 +76,7 @@ module.exports = async function init(databaseSchema = 'test', getLogger) {
|
|||||||
const db = createDb(options);
|
const db = createDb(options);
|
||||||
const eventBus = new EventEmitter();
|
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 db.raw(`CREATE SCHEMA IF NOT EXISTS ${options.databaseSchema}`);
|
||||||
await migrator(options);
|
await migrator(options);
|
||||||
await db.destroy();
|
await db.destroy();
|
||||||
|
Loading…
Reference in New Issue
Block a user