Conditionally run db migrations in catalog backend
Signed-off-by: Marcus Eide <eide@spotify.com>
This commit is contained in:
@@ -336,7 +336,10 @@ export class NextCatalogBuilder {
|
||||
const parser = this.parser || defaultEntityDataParser;
|
||||
|
||||
const dbClient = await database.getClient();
|
||||
await applyDatabaseMigrations(dbClient);
|
||||
if (database.runMigrations) {
|
||||
logger.info('Performing database migration');
|
||||
await applyDatabaseMigrations(dbClient);
|
||||
}
|
||||
|
||||
const db = new CommonDatabase(dbClient, logger);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user