fix: fkeys on device_id

This commit is contained in:
Rafael Taranto 2024-08-21 13:24:37 +01:00
parent 741eac9484
commit 2b2738c204
3 changed files with 15 additions and 1 deletions

View file

@ -49,6 +49,7 @@ const getDefaultSchema = () => 'ERROR_SCHEMA'
const searchPathWrapper = (t, cb) => {
return t.none('SET search_path TO $1:name', [getSchema()])
.then(cb.bind(t, t))
.catch(logger.error)
.finally(() => t.none('SET search_path TO $1:name', [getDefaultSchema()]))
}