Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// run boot sql script every time - independent, no transaction
const bootSqlStatements = this.getBootSql();
for (const sql of Object.values(bootSqlStatements)) {
this.logger.trace('migration.boot.sql.statement', sql);
yield dbClient.query(sql);
}
});
}
};
Migration = __decorate([
di_1.Service(),
__param(0, di_1.Inject(type => config_1.Config)),
__param(1, di_1.Inject(type => logger_1.LoggerFactory)),
__param(2, di_1.Inject(type => db_1.DbAppClient)),
__metadata("design:paramtypes", [config_1.Config,
logger_1.LoggerFactory,
db_1.DbAppClient])
], Migration);
exports.Migration = Migration;
__param(1, di_1.Inject((type) => logger_1.LoggerFactory)),
__param(2, di_1.Inject((type) => boot_loader_1.BootLoader)),
__param(0, di_1.Inject(type => logger_1.LoggerFactory)),
__param(1, di_1.Inject(type => config_1.Config)),
else {
throw new Error(`A verifier for type '${type}' already exists.`);
}
}
};
FileStorage = __decorate([
di_1.Service(),
__param(0, di_1.Inject((type) => logger_1.LoggerFactory)),
__param(1, di_1.Inject((type) => db_1.DbGeneralPool)),
__param(2, di_1.Inject((type) => server_1.Server)),
__param(3, di_1.Inject((type) => boot_loader_1.BootLoader)),
__param(4, di_1.Inject((type) => config_1.Config)),
__param(5, di_1.Inject((type) => graphql_1.GraphQl)),
__param(6, di_1.Inject((type) => schema_builder_1.SchemaBuilder)),
__param(7, di_1.Inject((type) => auth_1.Auth)),
__metadata("design:paramtypes", [logger_1.LoggerFactory, Object, Object, Object, Object, Object, Object, Object])
], FileStorage);
exports.FileStorage = FileStorage;
__param(6, di_1.Inject((type) => logger_1.LoggerFactory)),
__metadata("design:paramtypes", [Object, Object, Object, Object, Object, Object, logger_1.LoggerFactory])
__param(2, di_1.Inject((type) => logger_1.LoggerFactory)),
__param(3, di_1.Inject((type) => config_1.Config)),
return yield this.schemaBuilder.getDbSchemaBuilder().migrate(fromDbMeta, toDbMeta, configDB.renameInsteadOfDrop);
}
catch (err) {
this.logger.warn("runMigration.error", err);
}
});
}
};
AutoMigrate = __decorate([
di_1.Service(),
__param(0, di_1.Inject((type) => logger_1.LoggerFactory)),
__param(1, di_1.Inject((type) => boot_loader_1.BootLoader)),
__param(2, di_1.Inject((type) => config_1.Config)),
__param(3, di_1.Inject((type) => schema_builder_1.SchemaBuilder)),
__param(4, di_1.Inject((type) => db_1.DbAppClient)),
__metadata("design:paramtypes", [logger_1.LoggerFactory,
boot_loader_1.BootLoader,
config_1.Config,
schema_builder_1.SchemaBuilder,
db_1.DbAppClient])
], AutoMigrate);
exports.AutoMigrate = AutoMigrate;
__param(1, di_1.Inject((type) => logger_1.LoggerFactory)),
__param(2, di_1.Inject((type) => boot_loader_1.BootLoader)),
__param(5, di_1.Inject((type) => logger_1.LoggerFactory)),
__metadata("design:paramtypes", [Object, Object, Object, Object, Object, logger_1.LoggerFactory])
__param(0, di_1.Inject((type) => logger_1.LoggerFactory)),
__param(1, di_1.Inject((type) => config_1.Config)),