MCPcopy Index your code
hub / github.com/simstudioai/sim / releaseMigrationLock

Function releaseMigrationLock

packages/db/scripts/migrate.ts:239–248  ·  view source on GitHub ↗

* Unlock errors are swallowed: the session lock auto-releases on disconnect, * and a thrown unlock would falsely report a committed migration as failed.

()

Source from the content-addressed store, hash-verified

237 * and a thrown unlock would falsely report a committed migration as failed.
238 */
239async function releaseMigrationLock(): Promise<void> {
240 try {
241 await client`SELECT pg_advisory_unlock(${MIGRATION_LOCK_KEY})`
242 } catch (unlockError) {
243 console.error(
244 'WARN: pg_advisory_unlock failed; the session lock will auto-release on disconnect.',
245 unlockError
246 )
247 }
248}
249
250/**
251 * Print every diagnostic field a Postgres driver puts on a thrown error. The default

Callers 1

migrate.tsFile · 0.85

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected