File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55### Minor Changes
66
7- - aa22a40: ## Dynamic Schema & Table Names
7+ - aa22a40: ** Dynamic Schema & Table Names**
88 - All adapters (Drizzle, Kysely, Prisma) now support configurable schema and table names for queue jobs.
99 - Enables an easier integration in existing DB setups.
1010
11- ## Example: Drizzle Adapter with Custom Schema & Table
12-
13- ``` typescript
14- // drizzle-schema.ts
15- import { createQueueJobsTable } from " @vorsteh-queue/adapter-drizzle"
16-
17- export const { table : customQueueJobs, schema : customSchema } = createQueueJobsTable (
18- " custom_queue_jobs" ,
19- " custom_schema" ,
20- )
21-
22- // queue.ts
23- import { drizzle } from " drizzle-orm/node-postgres"
24- import { Pool } from " pg"
25- import * as schema from " src/drizzle-schema.ts2
26-
27- import { PostgresQueueAdapter } from " @vorsteh-queue/adapter-drizzle"
28-
29- const pool = new Pool ({ connectionString: process .env .DATABASE_URL })
30- const db = drizzle (pool , { schema })
31-
32- const adapter = new PostgresQueueAdapter (db , {
33- modelName: " customQueueJobs" ,
34- })
35-
36- // The queue will now use the specified schema and table
37- const queue = new Queue (adapter , { name: " my-queue" })
38- ```
39-
4011### Patch Changes
4112
4213- Updated dependencies [ aa22a40]
Original file line number Diff line number Diff line change 44
55### Minor Changes
66
7- - aa22a40: ## Dynamic Schema & Table Names
7+ - aa22a40: ** Dynamic Schema & Table Names**
88 - All adapters (Drizzle, Kysely, Prisma) now support configurable schema and table names for queue jobs.
99 - Enables an easier integration in existing DB setups.
1010
11- ## Example: Drizzle Adapter with Custom Schema & Table
12-
13- ``` typescript
14- // drizzle-schema.ts
15- import { createQueueJobsTable } from " @vorsteh-queue/adapter-drizzle"
16-
17- export const { table : customQueueJobs, schema : customSchema } = createQueueJobsTable (
18- " custom_queue_jobs" ,
19- " custom_schema" ,
20- )
21-
22- // queue.ts
23- import { drizzle } from " drizzle-orm/node-postgres"
24- import { Pool } from " pg"
25- import * as schema from " src/drizzle-schema.ts2
26-
27- import { PostgresQueueAdapter } from " @vorsteh-queue/adapter-drizzle"
28-
29- const pool = new Pool ({ connectionString: process .env .DATABASE_URL })
30- const db = drizzle (pool , { schema })
31-
32- const adapter = new PostgresQueueAdapter (db , {
33- modelName: " customQueueJobs" ,
34- })
35-
36- // The queue will now use the specified schema and table
37- const queue = new Queue (adapter , { name: " my-queue" })
38- ```
39-
4011### Patch Changes
4112
4213- Updated dependencies [ aa22a40]
Original file line number Diff line number Diff line change 44
55### Minor Changes
66
7- - aa22a40: ## Dynamic Schema & Table Names
7+ - aa22a40: ** Dynamic Schema & Table Names**
88 - All adapters (Drizzle, Kysely, Prisma) now support configurable schema and table names for queue jobs.
99 - Enables an easier integration in existing DB setups.
1010
11- ## Example: Drizzle Adapter with Custom Schema & Table
12-
13- ``` typescript
14- // drizzle-schema.ts
15- import { createQueueJobsTable } from " @vorsteh-queue/adapter-drizzle"
16-
17- export const { table : customQueueJobs, schema : customSchema } = createQueueJobsTable (
18- " custom_queue_jobs" ,
19- " custom_schema" ,
20- )
21-
22- // queue.ts
23- import { drizzle } from " drizzle-orm/node-postgres"
24- import { Pool } from " pg"
25- import * as schema from " src/drizzle-schema.ts2
26-
27- import { PostgresQueueAdapter } from " @vorsteh-queue/adapter-drizzle"
28-
29- const pool = new Pool ({ connectionString: process .env .DATABASE_URL })
30- const db = drizzle (pool , { schema })
31-
32- const adapter = new PostgresQueueAdapter (db , {
33- modelName: " customQueueJobs" ,
34- })
35-
36- // The queue will now use the specified schema and table
37- const queue = new Queue (adapter , { name: " my-queue" })
38- ```
39-
4011### Patch Changes
4112
4213- Updated dependencies [ aa22a40]
Original file line number Diff line number Diff line change 88 - All adapters (Drizzle, Kysely, Prisma) now support configurable schema and table names for queue jobs.
99 - Enables an easier integration in existing DB setups.
1010
11- ## Example: Drizzle Adapter with Custom Schema & Table
12-
13- ``` typescript
14- // drizzle-schema.ts
15- import { createQueueJobsTable } from " @vorsteh-queue/adapter-drizzle"
16-
17- export const { table : customQueueJobs, schema : customSchema } = createQueueJobsTable (
18- " custom_queue_jobs" ,
19- " custom_schema" ,
20- )
21-
22- // queue.ts
23- import { drizzle } from " drizzle-orm/node-postgres"
24- import { Pool } from " pg"
25- import * as schema from " src/drizzle-schema.ts2
26-
27- import { PostgresQueueAdapter } from " @vorsteh-queue/adapter-drizzle"
28-
29- const pool = new Pool ({ connectionString: process .env .DATABASE_URL })
30- const db = drizzle (pool , { schema })
31-
32- const adapter = new PostgresQueueAdapter (db , {
33- modelName: " customQueueJobs" ,
34- })
35-
36- // The queue will now use the specified schema and table
37- const queue = new Queue (adapter , { name: " my-queue" })
38- ```
39-
4011## 0.4.0
4112
4213### Minor Changes
You can’t perform that action at this time.
0 commit comments