MCPcopy Index your code
hub / github.com/colbymchenry/codegraph / getSchemaVersion

Method getSchemaVersion

src/db/index.ts:163–175  ·  view source on GitHub ↗

* Get current schema version

()

Source from the content-addressed store, hash-verified

161 * Get current schema version
162 */
163 getSchemaVersion(): SchemaVersion | null {
164 const row = this.db
165 .prepare('SELECT version, applied_at, description FROM schema_versions ORDER BY version DESC LIMIT 1')
166 .get() as { version: number; applied_at: number; description: string | null } | undefined;
167
168 if (!row) return null;
169
170 return {
171 version: row.version,
172 appliedAt: row.applied_at,
173 description: row.description ?? undefined,
174 };
175 }
176
177 /**
178 * 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