MCPcopy Index your code
hub / github.com/codebymitch/TitanBot / getCurrentSchemaVersion

Function getCurrentSchemaVersion

scripts/migrate.js:46–57  ·  view source on GitHub ↗
(client)

Source from the content-addressed store, hash-verified

44};
45
46const getCurrentSchemaVersion = async (client) => {
47 await ensureMigrationLedger(client);
48 const result = await client.query(
49 `SELECT version, label, applied_at FROM ${migrationTable} ORDER BY version DESC LIMIT 1`
50 );
51
52 if (result.rows.length === 0) {
53 return null;
54 }
55
56 return result.rows[0];
57};
58
59const createTables = async (client) => {
60 logger.info('📊 Creating database tables...');

Callers 2

checkMigrationVersionFunction · 0.85
printMigrationStatusFunction · 0.85

Calls 1

ensureMigrationLedgerFunction · 0.85

Tested by

no test coverage detected