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

Function recordSchemaVersion

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

Source from the content-addressed store, hash-verified

33};
34
35const recordSchemaVersion = async (client) => {
36 await ensureMigrationLedger(client);
37 await client.query(
38 `INSERT INTO ${migrationTable} (version, label)
39 VALUES ($1, $2)
40 ON CONFLICT (version)
41 DO UPDATE SET label = EXCLUDED.label, applied_at = CURRENT_TIMESTAMP`,
42 [EXPECTED_SCHEMA_VERSION, EXPECTED_SCHEMA_LABEL]
43 );
44};
45
46const getCurrentSchemaVersion = async (client) => {
47 await ensureMigrationLedger(client);

Callers 1

migrateFunction · 0.85

Calls 1

ensureMigrationLedgerFunction · 0.85

Tested by

no test coverage detected