MCPcopy Create free account
hub / github.com/mikro-orm/mikro-orm / updateStorage

Function updateStorage

packages/core/src/utils/AbstractMigrator.ts:222–228  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

220 await fs.writeFile(fs.normalizePath(this.absolutePath, fileName), code, { flush: true });
221
222 const updateStorage = async () => {
223 for (const migration of toRollup) {
224 await this.storage.unlogMigration({ name: migration.name });
225 }
226
227 await this.storage.logMigration({ name: fileName.replace(/\.[jt]s$/, '') });
228 };
229
230 if (this.options.transactional) {
231 await this.driver.getConnection().transactional(async trx => {

Callers 1

rollupFunction · 0.85

Calls 2

unlogMigrationMethod · 0.65
logMigrationMethod · 0.65

Tested by

no test coverage detected