Is your feature request related to a problem? Please describe.
I had thought that mixing Knex and Sequelize transactions would work, but had not tested it.
It does not work, as identified in https://github.com/icefoganalytics/wrap/pull/16
Describe alternatives you've considered
Removing all transaction related code during migration to Sequelize. I don't like this solution because the transaction code might never be added back in.
Fixes https://github.com/icefoganalytics/travel-authorization/issues/190
Relates to:
Context
Is your feature request related to a problem? Please describe. I had thought that mixing Knex and Sequelize transactions would work, but had not tested it. It does not work, as identified in https://github.com/icefoganalytics/wrap/pull/16
Describe the solution you'd like Switch to only using Sequelize code when running in a transaction. Use https://github.com/icefoganalytics/wrap/pull/16/commits/ec6cae86f72f7af0342396513da057628ccf1c22.
Describe alternatives you've considered Removing all transaction related code during migration to Sequelize. I don't like this solution because the transaction code might never be added back in.
Additional context
becomes
Implementation
Add api/src/db/utils/knex-query-to-sequelize-select.ts to transform knex queries to Sequelize ones.
Testing Instructions
dev test
(ordev test_api
)dev up
In a
api/src/now.ts
files run this code