@phips28, I'm creating this issue to track what you reported in #61. Since pg-boss uses pg's pool.query, implementing this change may require special attention from all users that pass in an existing database connection since it may or may not support transactions.
Another altenative I could try is squashing all migration scripts into a single multiple command statement. The docs don't seem to encourage that, though. There's probably other options as well.
My assumption at this point is that even if callers import a db prop during construction, the majority of them will finally resolve to the same pg driver in node. However, if they're highly abstracted, like strongloop's loopback connector, they may never have that level of control over the driver.
@phips28, I'm creating this issue to track what you reported in #61. Since pg-boss uses pg's pool.query, implementing this change may require special attention from all users that pass in an existing database connection since it may or may not support transactions.
From https://node-postgres.com/features/transactions:
Another altenative I could try is squashing all migration scripts into a single multiple command statement. The docs don't seem to encourage that, though. There's probably other options as well.
My assumption at this point is that even if callers import a db prop during construction, the majority of them will finally resolve to the same pg driver in node. However, if they're highly abstracted, like strongloop's loopback connector, they may never have that level of control over the driver.