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

Function getPending

packages/core/src/utils/AbstractMigrator.ts:116–128  ·  view source on GitHub ↗

* @inheritDoc

(options?: { schema?: string })

Source from the content-addressed store, hash-verified

114 * @inheritDoc
115 */
116 async getPending(options?: { schema?: string }): Promise<MigrationInfo[]> {
117 await this.init();
118 const schema = options?.schema ?? this.options.schema;
119 this.storage.setRunSchema?.(schema);
120
121 try {
122 const all = await this.discoverMigrations();
123 const executed = new Set(await this.storage.executed());
124 return all.filter(m => !executed.has(m.name)).map(m => ({ name: m.name, path: m.path }));
125 } finally {
126 this.storage.unsetRunSchema?.();
127 }
128 }
129
130 /**
131 * @inheritDoc

Callers

nothing calls this directly

Calls 7

filterMethod · 0.80
initMethod · 0.65
setRunSchemaMethod · 0.65
executedMethod · 0.65
hasMethod · 0.65
unsetRunSchemaMethod · 0.65
mapMethod · 0.45

Tested by

no test coverage detected