File tree Expand file tree Collapse file tree 1 file changed +24
-18
lines changed
packages/adapter-drizzle/src Expand file tree Collapse file tree 1 file changed +24
-18
lines changed Original file line number Diff line number Diff line change @@ -43,24 +43,30 @@ export const createQueueJobsTable = (tableName: string, schemaName?: string) =>
4343 const schema = schemaName ? pgSchema ( schemaName ) : undefined
4444
4545 if ( isPgSchema ( schema ) ) {
46- return schema . table ( tableName , columns , ( table ) => [
47- index ( `idx_${ tableName } _status_priority` ) . on (
48- table . queueName ,
49- table . status ,
50- table . priority ,
51- table . createdAt ,
52- ) ,
53- index ( `idx_${ tableName } _process_at` ) . on ( table . processAt ) ,
54- ] )
46+ return {
47+ schema,
48+ table : schema . table ( tableName , columns , ( table ) => [
49+ index ( `idx_${ tableName } _status_priority` ) . on (
50+ table . queueName ,
51+ table . status ,
52+ table . priority ,
53+ table . createdAt ,
54+ ) ,
55+ index ( `idx_${ tableName } _process_at` ) . on ( table . processAt ) ,
56+ ] ) ,
57+ }
5558 } else {
56- return pgTable ( tableName , columns , ( table ) => [
57- index ( `idx_${ tableName } _status_priority` ) . on (
58- table . queueName ,
59- table . status ,
60- table . priority ,
61- table . createdAt ,
62- ) ,
63- index ( `idx_${ tableName } _process_at` ) . on ( table . processAt ) ,
64- ] )
59+ return {
60+ schema : undefined ,
61+ table : pgTable ( tableName , columns , ( table ) => [
62+ index ( `idx_${ tableName } _status_priority` ) . on (
63+ table . queueName ,
64+ table . status ,
65+ table . priority ,
66+ table . createdAt ,
67+ ) ,
68+ index ( `idx_${ tableName } _process_at` ) . on ( table . processAt ) ,
69+ ] ) ,
70+ }
6571 }
6672}
You can’t perform that action at this time.
0 commit comments