mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +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 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();
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user