MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / previous

Function previous

packages/core/fumadb/src/migration-engine/create.ts:197–204  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

195 return list[index + 1];
196 },
197 async previous() {
198 const version = await settings.getVersion();
199 if (!version) return;
200
201 const list = getSchemasOfVariant(parse(version)!.prerelease);
202 const index = list.findIndex((schema) => schema.version === version);
203 return list[index - 1];
204 },
205 async up(options = {}) {
206 const next = await this.next();
207 if (!next) throw new Error("Already up to date.");

Callers

nothing calls this directly

Calls 1

getSchemasOfVariantFunction · 0.85

Tested by

no test coverage detected