MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / getSchemaVersion

Method getSchemaVersion

src/db/index.ts:433–445  ·  view source on GitHub ↗

* Get current schema version

()

Source from the content-addressed store, hash-verified

431 * Get current schema version
432 */
433 getSchemaVersion(): SchemaVersion | null {
434 const row = this.db
435 .prepare('SELECT version, applied_at, description FROM schema_versions ORDER BY version DESC LIMIT 1')
436 .get() as { version: number; applied_at: number; description: string | null } | undefined;
437
438 if (!row) return null;
439
440 return {
441 version: row.version,
442 appliedAt: row.applied_at,
443 description: row.description ?? undefined,
444 };
445 }
446
447 /**
448 * Execute a function within a transaction

Callers 1

foundation.test.tsFile · 0.80

Calls 2

getMethod · 0.65
prepareMethod · 0.65

Tested by

no test coverage detected