- Abstract shared sql code to a new drizzle package - Adds sqlite package, not ready to publish until drizzle patches some issues - Add `transactionOptions` to allow customizing or disabling db transactions - Adds "experimental" label to the `schemaName` property until drizzle patches an issue
18 lines
506 B
TypeScript
18 lines
506 B
TypeScript
import type { Destroy } from 'payload'
|
|
|
|
import type { DrizzleAdapter } from './types.js'
|
|
|
|
// eslint-disable-next-line @typescript-eslint/require-await
|
|
export const destroy: Destroy = async function destroy(this: DrizzleAdapter) {
|
|
if (this.enums) this.enums = {}
|
|
this.schema = {}
|
|
this.tables = {}
|
|
this.relations = {}
|
|
this.fieldConstraints = {}
|
|
this.drizzle = undefined
|
|
this.initializing = new Promise((res, rej) => {
|
|
this.resolveInitializing = res
|
|
this.rejectInitializing = rej
|
|
})
|
|
}
|