File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { snakeCase } from "lodash"
44
55import { DB_CONFIG } from "@/config"
66
7- import { NON_STANDARD_COLUMN_NAMES_TRANSFORMS } from ' @/utils/db-wrap-identifier-helpers'
7+ import { NON_STANDARD_COLUMN_NAMES_TRANSFORMS } from " @/utils/db-wrap-identifier-helpers"
88
99const db = knex ( {
1010 client : DB_CONFIG . client ,
@@ -36,6 +36,8 @@ const dbWithSchema: Knex = new Proxy(db, {
3636 if ( typeof target [ prop ] === "function" ) {
3737 if ( prop === "withSchema" ) {
3838 return ( schema : string ) => target [ prop ] ( schema ) // format taken from src/api/node_modules/knex/types/index.d.ts
39+ } else if ( prop === "destroy" ) {
40+ return ( callback : Function ) => db . destroy ( callback )
3941 } else {
4042 return ( ...args : any [ ] ) => target [ prop ] ( ...args ) . withSchema ( DB_CONFIG . defaultSchema )
4143 }
You can’t perform that action at this time.
0 commit comments