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

Method getSchemaVersion

src/db/index.ts:660–672  ·  view source on GitHub ↗

* Get current schema version

()

Source from the content-addressed store, hash-verified

658 * Get current schema version
659 */
660 getSchemaVersion(): SchemaVersion | null {
661 const row = this.db
662 .prepare('SELECT version, applied_at, description FROM schema_versions ORDER BY version DESC LIMIT 1')
663 .get() as { version: number; applied_at: number; description: string | null } | undefined;
664
665 if (!row) return null;
666
667 return {
668 version: row.version,
669 appliedAt: row.applied_at,
670 description: row.description ?? undefined,
671 };
672 }
673
674 /**
675 * Execute a function within a transaction

Callers 3

foundation.test.tsFile · 0.80
schemaVersionFunction · 0.80

Calls 2

getMethod · 0.65
prepareMethod · 0.65

Tested by 1

schemaVersionFunction · 0.64