fix(db-postgres, db-sqlite): enum schema (#7453)

- updates drizzle-kit and drizzle-orm
- fix enum creation to fully support custom schemas
- sqlite by default will not use transactions
This commit is contained in:
Dan Ribbens
2024-07-31 16:42:00 -04:00
committed by GitHub
parent 1ec78a16f0
commit 075819964d
23 changed files with 185 additions and 278 deletions

View File

@@ -11,8 +11,8 @@ const Hooks: CollectionConfig = {
},
hooks: {
beforeOperation: [
({ req, operation }) => {
if (!req.transactionID && ['create', 'delete', 'update'].includes(operation)) {
({ operation, req }) => {
if (typeof req.payload.db.beginTransaction === 'function' && !req.transactionID && ['create', 'delete', 'update'].includes(operation)) {
throw new Error('transactionID is missing in beforeOperation hook')
}
},