Skip to content

Commit 2b25f9e

Browse files
committed
update changeset
1 parent 92c0032 commit 2b25f9e

File tree

1 file changed

+1
-30
lines changed

1 file changed

+1
-30
lines changed

.changeset/crazy-colts-march.md

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,7 @@
55
"@vorsteh-queue/core": minor
66
---
77

8-
## Dynamic Schema & Table Names
8+
**Dynamic Schema & Table Names**
99

1010
- All adapters (Drizzle, Kysely, Prisma) now support configurable schema and table names for queue jobs.
1111
- Enables an easier integration in existing DB setups.
12-
13-
## Example: Drizzle Adapter with Custom Schema & Table
14-
15-
```typescript
16-
// drizzle-schema.ts
17-
import { createQueueJobsTable } from "@vorsteh-queue/adapter-drizzle"
18-
19-
export const { table: customQueueJobs, schema: customSchema } = createQueueJobsTable(
20-
"custom_queue_jobs",
21-
"custom_schema",
22-
)
23-
24-
// queue.ts
25-
import { drizzle } from "drizzle-orm/node-postgres"
26-
import { Pool } from "pg"
27-
import * as schema from "src/drizzle-schema.ts2
28-
29-
import { PostgresQueueAdapter } from "@vorsteh-queue/adapter-drizzle"
30-
31-
const pool = new Pool({ connectionString: process.env.DATABASE_URL })
32-
const db = drizzle(pool, { schema })
33-
34-
const adapter = new PostgresQueueAdapter(db, {
35-
modelName: "customQueueJobs",
36-
})
37-
38-
// The queue will now use the specified schema and table
39-
const queue = new Queue(adapter, { name: "my-queue" })
40-
```

0 commit comments

Comments
 (0)