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:
@@ -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')
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user