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

Method getSchemaVersion

src/db/index.ts:400–412  ·  view source on GitHub ↗

* Get current schema version

()

Source from the content-addressed store, hash-verified

398 * Get current schema version
399 */
400 getSchemaVersion(): SchemaVersion | null {
401 const row = this.db
402 .prepare('SELECT version, applied_at, description FROM schema_versions ORDER BY version DESC LIMIT 1')
403 .get() as { version: number; applied_at: number; description: string | null } | undefined;
404
405 if (!row) return null;
406
407 return {
408 version: row.version,
409 appliedAt: row.applied_at,
410 description: row.description ?? undefined,
411 };
412 }
413
414 /**
415 * 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