@workflow/world-postgres 4.3.9 → 4.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +73 -1
- package/dist/connection-errors.d.ts +23 -0
- package/dist/connection-errors.d.ts.map +1 -0
- package/dist/connection-errors.js +45 -0
- package/dist/drizzle/schema.d.ts +102 -68
- package/dist/drizzle/schema.d.ts.map +1 -1
- package/dist/drizzle/schema.js +45 -22
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +26 -7
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +371 -315
- package/package.json +4 -4
- package/src/drizzle/migrations/0027_timestamps_with_time_zone.sql +131 -0
- package/src/drizzle/migrations/meta/_journal.json +7 -0
package/README.md
CHANGED
|
@@ -145,16 +145,24 @@ const world = createWorld({
|
|
|
145
145
|
// Or pass an existing pg.Pool (shared with your app Drizzle, etc.); `world.close()` will not end it.
|
|
146
146
|
import { Pool } from "pg";
|
|
147
147
|
const pool = new Pool({ connectionString: process.env.DATABASE_URL });
|
|
148
|
+
// The World leaves a pool you pass to you: listen for errors, or a connection
|
|
149
|
+
// the server ends (a restart, a failover, an idle timeout) ends the process.
|
|
150
|
+
pool.on("connect", (client) =>
|
|
151
|
+
client.on("error", (error) => console.error(error.message))
|
|
152
|
+
);
|
|
153
|
+
pool.on("error", () => {}); // An idle client's error, logged just above
|
|
148
154
|
const worldFromPool = createWorld({ pool });
|
|
149
155
|
```
|
|
150
156
|
|
|
157
|
+
A connection the server ends emits an `'error'` event, and an `'error'` event with no listener ends the process. When `createWorld()` creates the pool, it listens on the pool and on every client it connects, and logs one `[world-postgres] Pooled PostgreSQL connection lost` line per lost connection. It doesn't add listeners to a pool you pass, so add both yourself, as above: pg-pool listens only on idle clients, and the World holds a checked-out client across a transaction's statements.
|
|
158
|
+
|
|
151
159
|
## Configuration Options
|
|
152
160
|
|
|
153
161
|
| Option | Type | Default | Description |
|
|
154
162
|
| ------------------ | --------- | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
|
|
155
163
|
| `connectionString` | `string` | `process.env.WORKFLOW_POSTGRES_URL` or `'postgres://world:world@localhost:5432/world'` | Used only when `pool` is omitted, to construct an internal pool |
|
|
156
164
|
| `maxPoolSize` | `number` | `process.env.WORKFLOW_POSTGRES_MAX_POOL_SIZE` or `pg.Pool` default (`10`) | Optional. Sets the internal `pg.Pool` max size when `createWorld()` creates the pool |
|
|
157
|
-
| `pool` | `pg.Pool` | — | Optional. When set, used for Drizzle, Graphile Worker, and stream writes. `world.close()` does not end it. |
|
|
165
|
+
| `pool` | `pg.Pool` | — | Optional. When set, used for Drizzle, Graphile Worker, and stream writes. `world.close()` does not end it, and the World adds no `'error'` listeners to it (see above). |
|
|
158
166
|
| `jobPrefix` | `string` | `process.env.WORKFLOW_POSTGRES_JOB_PREFIX` | Optional prefix for queue job names |
|
|
159
167
|
| `queueConcurrency` | `number` | `10` | Number of concurrent active step executions per process |
|
|
160
168
|
|
|
@@ -223,6 +231,44 @@ import * as schema from '@workflow/world-postgres/schema';
|
|
|
223
231
|
|
|
224
232
|
Make sure your PostgreSQL database is accessible and the user has sufficient permissions to create tables and manage jobs.
|
|
225
233
|
|
|
234
|
+
### Timestamps and time zones
|
|
235
|
+
|
|
236
|
+
Every timestamp column is `timestamp with time zone`, so values are correct
|
|
237
|
+
whatever time zone the server or session runs in. Earlier versions used
|
|
238
|
+
`timestamp without time zone`: on a server outside UTC, `createdAt` came back
|
|
239
|
+
off by the server's UTC offset (for example 7 hours early on
|
|
240
|
+
`America/Los_Angeles`).
|
|
241
|
+
|
|
242
|
+
Migration 0027 converts the columns. On a server in UTC it only changes the
|
|
243
|
+
catalog; no table is rewritten. On a server in another time zone it also moves
|
|
244
|
+
the values that came from `now()` (every `created_at`, and `updated_at` on rows
|
|
245
|
+
never updated) from the server's local time to the instant they recorded. That
|
|
246
|
+
costs about one rewrite of each table (new row versions, WAL, and bloat until
|
|
247
|
+
vacuum), with the tables' locks held until it finishes, so plan a maintenance
|
|
248
|
+
window for a large database.
|
|
249
|
+
|
|
250
|
+
The migration waits at most 10 seconds for its locks (unless the session sets
|
|
251
|
+
its own `lock_timeout`), so a long-running transaction makes `bootstrap` fail
|
|
252
|
+
instead of queueing every query behind it. Run `bootstrap` again once that
|
|
253
|
+
transaction ends.
|
|
254
|
+
|
|
255
|
+
It assumes the `now()` values were written in the time zone of the session
|
|
256
|
+
that runs the migration. If your application's pool set a different session
|
|
257
|
+
time zone, set `workflow.legacy_timezone` to that zone for the migration. Use
|
|
258
|
+
`?options=-c%20workflow.legacy_timezone%3DEurope%2FBerlin` in the connection
|
|
259
|
+
string, or, where a pooler drops startup `options` (PgBouncer and several
|
|
260
|
+
hosted poolers), `ALTER DATABASE mydb SET workflow.legacy_timezone =
|
|
261
|
+
'Europe/Berlin'` or `ALTER ROLE myuser SET ...` before running `bootstrap`.
|
|
262
|
+
|
|
263
|
+
On a server in UTC the upgrade order does not matter: the upgraded World reads
|
|
264
|
+
unconverted columns correctly in any Node.js time zone, and older versions read
|
|
265
|
+
converted ones correctly. On a server outside UTC, stop the previous version's
|
|
266
|
+
workers, run the migration, then start the upgraded app. Older versions read
|
|
267
|
+
the converted columns shifted by the server's UTC offset, which can skip or
|
|
268
|
+
stretch step retry backoffs. For the same reason there is no rolling back past
|
|
269
|
+
0027 on such a server: the migration has no down step, and an older version
|
|
270
|
+
would read every converted value shifted.
|
|
271
|
+
|
|
226
272
|
## Features
|
|
227
273
|
|
|
228
274
|
- **Durable Storage**: Stores workflow runs, events, steps, hooks, and webhooks in PostgreSQL
|
|
@@ -247,6 +293,32 @@ in-flight and recently completed deliveries with the same idempotency key.
|
|
|
247
293
|
Handlers must still tolerate at-least-once delivery across worker processes,
|
|
248
294
|
restarts, or completed-message cache eviction.
|
|
249
295
|
|
|
296
|
+
## Troubleshooting
|
|
297
|
+
|
|
298
|
+
### A run stays `running` after a crash
|
|
299
|
+
|
|
300
|
+
Earlier versions wrote a step's `step_completed` or `step_failed` event
|
|
301
|
+
separately from the step row. A process that died between the two left the step
|
|
302
|
+
finished with no matching event, and the run never advanced. This query lists
|
|
303
|
+
those steps for runs still `running`:
|
|
304
|
+
|
|
305
|
+
```sql
|
|
306
|
+
select s.run_id, s.step_id, s.step_name, s.status
|
|
307
|
+
from workflow.workflow_steps s
|
|
308
|
+
join workflow.workflow_runs r on r.id = s.run_id
|
|
309
|
+
where r.status = 'running'
|
|
310
|
+
and s.status in ('completed', 'failed')
|
|
311
|
+
and not exists (
|
|
312
|
+
select 1 from workflow.workflow_events e
|
|
313
|
+
where e.run_id = s.run_id
|
|
314
|
+
and e.correlation_id = s.step_id
|
|
315
|
+
and e.type = 'step_' || s.status
|
|
316
|
+
);
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
Upgrading does not recover these runs. Cancel each one with
|
|
320
|
+
`workflow cancel <run-id>`.
|
|
321
|
+
|
|
250
322
|
## Development
|
|
251
323
|
|
|
252
324
|
For local development, you can use the included Docker Compose configuration:
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Pool } from 'pg';
|
|
2
|
+
/**
|
|
3
|
+
* Keep a connection the server drops from ending the process.
|
|
4
|
+
*
|
|
5
|
+
* A restart or failover, `idle_session_timeout`, `pg_terminate_backend`, or a
|
|
6
|
+
* proxy closing idle sockets can end a connection at any time, and `pg`
|
|
7
|
+
* reports it as an `'error'` event on the client. pg-pool forwards an idle
|
|
8
|
+
* client's error to the pool, but detaches its own listener while a client is
|
|
9
|
+
* checked out, and Drizzle transactions and the invocation mailbox hold
|
|
10
|
+
* clients across statements. An `EventEmitter` with no `'error'` listener
|
|
11
|
+
* throws, so either case is an uncaught exception. Graphile Worker attaches
|
|
12
|
+
* listeners like these only while its runner is up, and a World that is only
|
|
13
|
+
* read from never starts one.
|
|
14
|
+
*
|
|
15
|
+
* Logging is all that is left to do: pg-pool discards a failed client when it
|
|
16
|
+
* is released, and a checked-out client's next query rejects, so its caller
|
|
17
|
+
* still sees the error.
|
|
18
|
+
*
|
|
19
|
+
* Only for a pool the World creates. A pool the caller passes in is theirs to
|
|
20
|
+
* listen on.
|
|
21
|
+
*/
|
|
22
|
+
export declare function handleConnectionErrors(pool: Pool, isClosing: () => boolean): void;
|
|
23
|
+
//# sourceMappingURL=connection-errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection-errors.d.ts","sourceRoot":"","sources":["../src/connection-errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAc,MAAM,IAAI,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,MAAM,OAAO,GACvB,IAAI,CAuBN"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keep a connection the server drops from ending the process.
|
|
3
|
+
*
|
|
4
|
+
* A restart or failover, `idle_session_timeout`, `pg_terminate_backend`, or a
|
|
5
|
+
* proxy closing idle sockets can end a connection at any time, and `pg`
|
|
6
|
+
* reports it as an `'error'` event on the client. pg-pool forwards an idle
|
|
7
|
+
* client's error to the pool, but detaches its own listener while a client is
|
|
8
|
+
* checked out, and Drizzle transactions and the invocation mailbox hold
|
|
9
|
+
* clients across statements. An `EventEmitter` with no `'error'` listener
|
|
10
|
+
* throws, so either case is an uncaught exception. Graphile Worker attaches
|
|
11
|
+
* listeners like these only while its runner is up, and a World that is only
|
|
12
|
+
* read from never starts one.
|
|
13
|
+
*
|
|
14
|
+
* Logging is all that is left to do: pg-pool discards a failed client when it
|
|
15
|
+
* is released, and a checked-out client's next query rejects, so its caller
|
|
16
|
+
* still sees the error.
|
|
17
|
+
*
|
|
18
|
+
* Only for a pool the World creates. A pool the caller passes in is theirs to
|
|
19
|
+
* listen on.
|
|
20
|
+
*/
|
|
21
|
+
export function handleConnectionErrors(pool, isClosing) {
|
|
22
|
+
const log = (error) => {
|
|
23
|
+
// Expected while the World shuts its pool down.
|
|
24
|
+
if (isClosing())
|
|
25
|
+
return;
|
|
26
|
+
// Never the error itself: pg-pool sets `error.client`, whose connection
|
|
27
|
+
// parameters include the password.
|
|
28
|
+
console.warn(`[world-postgres] Pooled PostgreSQL connection lost${error.code ? ` (${error.code})` : ''}: ${error.message}`);
|
|
29
|
+
};
|
|
30
|
+
pool.on('connect', (client) => {
|
|
31
|
+
let lost = false;
|
|
32
|
+
client.on('error', (error) => {
|
|
33
|
+
// A client nobody has ended reports one drop twice: the server's error,
|
|
34
|
+
// then "Connection terminated unexpectedly" as the socket closes.
|
|
35
|
+
if (lost)
|
|
36
|
+
return;
|
|
37
|
+
lost = true;
|
|
38
|
+
log(error);
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
// pg-pool re-emits an idle client's error here after the listener above has
|
|
42
|
+
// logged it, so this one only keeps the pool from throwing.
|
|
43
|
+
pool.on('error', () => { });
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29ubmVjdGlvbi1lcnJvcnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvY29ubmVjdGlvbi1lcnJvcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUE7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7R0FtQkc7QUFDSCxNQUFNLFVBQVUsc0JBQXNCLENBQ3BDLElBQVUsRUFDVixTQUF3QjtJQUV4QixNQUFNLEdBQUcsR0FBRyxDQUFDLEtBQWdDLEVBQUUsRUFBRTtRQUMvQyxnREFBZ0Q7UUFDaEQsSUFBSSxTQUFTLEVBQUU7WUFBRSxPQUFPO1FBQ3hCLHdFQUF3RTtRQUN4RSxtQ0FBbUM7UUFDbkMsT0FBTyxDQUFDLElBQUksQ0FDVixxREFBcUQsS0FBSyxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUMsS0FBSyxLQUFL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IpO1xuICAgIH0pO1xuICB9KTtcbiAgLy8gcGctcG9vbCByZS1lbWl0cyBhbiBpZGxlIGNsaWVudCdzIGVycm9yIGhlcmUgYWZ0ZXIgdGhlIGxpc3RlbmVyIGFib3ZlIGhhc1xuICAvLyBsb2dnZWQgaXQsIHNvIHRoaXMgb25lIG9ubHkga2VlcHMgdGhlIHBvb2wgZnJvbSB0aHJvd2luZy5cbiAgcG9vbC5vbignZXJyb3InLCAoKSA9PiB7fSk7XG59XG4iXX0=
|
package/dist/drizzle/schema.d.ts
CHANGED
|
@@ -258,10 +258,10 @@ export declare const runs: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
258
258
|
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
259
259
|
name: "created_at";
|
|
260
260
|
tableName: "workflow_runs";
|
|
261
|
-
dataType: "
|
|
262
|
-
columnType: "
|
|
261
|
+
dataType: "custom";
|
|
262
|
+
columnType: "PgCustomColumn";
|
|
263
263
|
data: Date;
|
|
264
|
-
driverParam: string;
|
|
264
|
+
driverParam: string | Date;
|
|
265
265
|
notNull: true;
|
|
266
266
|
hasDefault: true;
|
|
267
267
|
isPrimaryKey: false;
|
|
@@ -271,14 +271,16 @@ export declare const runs: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
271
271
|
baseColumn: never;
|
|
272
272
|
identity: undefined;
|
|
273
273
|
generated: undefined;
|
|
274
|
-
}, {}, {
|
|
274
|
+
}, {}, {
|
|
275
|
+
pgColumnBuilderBrand: "PgCustomColumnBuilderBrand";
|
|
276
|
+
}>;
|
|
275
277
|
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
276
278
|
name: "updated_at";
|
|
277
279
|
tableName: "workflow_runs";
|
|
278
|
-
dataType: "
|
|
279
|
-
columnType: "
|
|
280
|
+
dataType: "custom";
|
|
281
|
+
columnType: "PgCustomColumn";
|
|
280
282
|
data: Date;
|
|
281
|
-
driverParam: string;
|
|
283
|
+
driverParam: string | Date;
|
|
282
284
|
notNull: true;
|
|
283
285
|
hasDefault: true;
|
|
284
286
|
isPrimaryKey: false;
|
|
@@ -288,14 +290,16 @@ export declare const runs: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
288
290
|
baseColumn: never;
|
|
289
291
|
identity: undefined;
|
|
290
292
|
generated: undefined;
|
|
291
|
-
}, {}, {
|
|
293
|
+
}, {}, {
|
|
294
|
+
pgColumnBuilderBrand: "PgCustomColumnBuilderBrand";
|
|
295
|
+
}>;
|
|
292
296
|
completedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
293
297
|
name: "completed_at";
|
|
294
298
|
tableName: "workflow_runs";
|
|
295
|
-
dataType: "
|
|
296
|
-
columnType: "
|
|
299
|
+
dataType: "custom";
|
|
300
|
+
columnType: "PgCustomColumn";
|
|
297
301
|
data: Date;
|
|
298
|
-
driverParam: string;
|
|
302
|
+
driverParam: string | Date;
|
|
299
303
|
notNull: false;
|
|
300
304
|
hasDefault: false;
|
|
301
305
|
isPrimaryKey: false;
|
|
@@ -305,14 +309,16 @@ export declare const runs: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
305
309
|
baseColumn: never;
|
|
306
310
|
identity: undefined;
|
|
307
311
|
generated: undefined;
|
|
308
|
-
}, {}, {
|
|
312
|
+
}, {}, {
|
|
313
|
+
pgColumnBuilderBrand: "PgCustomColumnBuilderBrand";
|
|
314
|
+
}>;
|
|
309
315
|
startedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
310
316
|
name: "started_at";
|
|
311
317
|
tableName: "workflow_runs";
|
|
312
|
-
dataType: "
|
|
313
|
-
columnType: "
|
|
318
|
+
dataType: "custom";
|
|
319
|
+
columnType: "PgCustomColumn";
|
|
314
320
|
data: Date;
|
|
315
|
-
driverParam: string;
|
|
321
|
+
driverParam: string | Date;
|
|
316
322
|
notNull: false;
|
|
317
323
|
hasDefault: false;
|
|
318
324
|
isPrimaryKey: false;
|
|
@@ -322,14 +328,16 @@ export declare const runs: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
322
328
|
baseColumn: never;
|
|
323
329
|
identity: undefined;
|
|
324
330
|
generated: undefined;
|
|
325
|
-
}, {}, {
|
|
331
|
+
}, {}, {
|
|
332
|
+
pgColumnBuilderBrand: "PgCustomColumnBuilderBrand";
|
|
333
|
+
}>;
|
|
326
334
|
expiredAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
327
335
|
name: "expired_at";
|
|
328
336
|
tableName: "workflow_runs";
|
|
329
|
-
dataType: "
|
|
330
|
-
columnType: "
|
|
337
|
+
dataType: "custom";
|
|
338
|
+
columnType: "PgCustomColumn";
|
|
331
339
|
data: Date;
|
|
332
|
-
driverParam: string;
|
|
340
|
+
driverParam: string | Date;
|
|
333
341
|
notNull: false;
|
|
334
342
|
hasDefault: false;
|
|
335
343
|
isPrimaryKey: false;
|
|
@@ -339,7 +347,9 @@ export declare const runs: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
339
347
|
baseColumn: never;
|
|
340
348
|
identity: undefined;
|
|
341
349
|
generated: undefined;
|
|
342
|
-
}, {}, {
|
|
350
|
+
}, {}, {
|
|
351
|
+
pgColumnBuilderBrand: "PgCustomColumnBuilderBrand";
|
|
352
|
+
}>;
|
|
343
353
|
};
|
|
344
354
|
dialect: "pg";
|
|
345
355
|
}>;
|
|
@@ -408,10 +418,10 @@ export declare const events: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
408
418
|
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
409
419
|
name: "created_at";
|
|
410
420
|
tableName: "workflow_events";
|
|
411
|
-
dataType: "
|
|
412
|
-
columnType: "
|
|
421
|
+
dataType: "custom";
|
|
422
|
+
columnType: "PgCustomColumn";
|
|
413
423
|
data: Date;
|
|
414
|
-
driverParam: string;
|
|
424
|
+
driverParam: string | Date;
|
|
415
425
|
notNull: true;
|
|
416
426
|
hasDefault: true;
|
|
417
427
|
isPrimaryKey: false;
|
|
@@ -421,7 +431,9 @@ export declare const events: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
421
431
|
baseColumn: never;
|
|
422
432
|
identity: undefined;
|
|
423
433
|
generated: undefined;
|
|
424
|
-
}, {}, {
|
|
434
|
+
}, {}, {
|
|
435
|
+
pgColumnBuilderBrand: "PgCustomColumnBuilderBrand";
|
|
436
|
+
}>;
|
|
425
437
|
runId: import("drizzle-orm/pg-core").PgColumn<{
|
|
426
438
|
name: "run_id";
|
|
427
439
|
tableName: "workflow_events";
|
|
@@ -711,10 +723,10 @@ export declare const steps: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
711
723
|
startedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
712
724
|
name: "started_at";
|
|
713
725
|
tableName: "workflow_steps";
|
|
714
|
-
dataType: "
|
|
715
|
-
columnType: "
|
|
726
|
+
dataType: "custom";
|
|
727
|
+
columnType: "PgCustomColumn";
|
|
716
728
|
data: Date;
|
|
717
|
-
driverParam: string;
|
|
729
|
+
driverParam: string | Date;
|
|
718
730
|
notNull: false;
|
|
719
731
|
hasDefault: false;
|
|
720
732
|
isPrimaryKey: false;
|
|
@@ -724,14 +736,16 @@ export declare const steps: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
724
736
|
baseColumn: never;
|
|
725
737
|
identity: undefined;
|
|
726
738
|
generated: undefined;
|
|
727
|
-
}, {}, {
|
|
739
|
+
}, {}, {
|
|
740
|
+
pgColumnBuilderBrand: "PgCustomColumnBuilderBrand";
|
|
741
|
+
}>;
|
|
728
742
|
completedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
729
743
|
name: "completed_at";
|
|
730
744
|
tableName: "workflow_steps";
|
|
731
|
-
dataType: "
|
|
732
|
-
columnType: "
|
|
745
|
+
dataType: "custom";
|
|
746
|
+
columnType: "PgCustomColumn";
|
|
733
747
|
data: Date;
|
|
734
|
-
driverParam: string;
|
|
748
|
+
driverParam: string | Date;
|
|
735
749
|
notNull: false;
|
|
736
750
|
hasDefault: false;
|
|
737
751
|
isPrimaryKey: false;
|
|
@@ -741,14 +755,16 @@ export declare const steps: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
741
755
|
baseColumn: never;
|
|
742
756
|
identity: undefined;
|
|
743
757
|
generated: undefined;
|
|
744
|
-
}, {}, {
|
|
758
|
+
}, {}, {
|
|
759
|
+
pgColumnBuilderBrand: "PgCustomColumnBuilderBrand";
|
|
760
|
+
}>;
|
|
745
761
|
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
746
762
|
name: "created_at";
|
|
747
763
|
tableName: "workflow_steps";
|
|
748
|
-
dataType: "
|
|
749
|
-
columnType: "
|
|
764
|
+
dataType: "custom";
|
|
765
|
+
columnType: "PgCustomColumn";
|
|
750
766
|
data: Date;
|
|
751
|
-
driverParam: string;
|
|
767
|
+
driverParam: string | Date;
|
|
752
768
|
notNull: true;
|
|
753
769
|
hasDefault: true;
|
|
754
770
|
isPrimaryKey: false;
|
|
@@ -758,14 +774,16 @@ export declare const steps: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
758
774
|
baseColumn: never;
|
|
759
775
|
identity: undefined;
|
|
760
776
|
generated: undefined;
|
|
761
|
-
}, {}, {
|
|
777
|
+
}, {}, {
|
|
778
|
+
pgColumnBuilderBrand: "PgCustomColumnBuilderBrand";
|
|
779
|
+
}>;
|
|
762
780
|
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
763
781
|
name: "updated_at";
|
|
764
782
|
tableName: "workflow_steps";
|
|
765
|
-
dataType: "
|
|
766
|
-
columnType: "
|
|
783
|
+
dataType: "custom";
|
|
784
|
+
columnType: "PgCustomColumn";
|
|
767
785
|
data: Date;
|
|
768
|
-
driverParam: string;
|
|
786
|
+
driverParam: string | Date;
|
|
769
787
|
notNull: true;
|
|
770
788
|
hasDefault: true;
|
|
771
789
|
isPrimaryKey: false;
|
|
@@ -775,14 +793,16 @@ export declare const steps: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
775
793
|
baseColumn: never;
|
|
776
794
|
identity: undefined;
|
|
777
795
|
generated: undefined;
|
|
778
|
-
}, {}, {
|
|
796
|
+
}, {}, {
|
|
797
|
+
pgColumnBuilderBrand: "PgCustomColumnBuilderBrand";
|
|
798
|
+
}>;
|
|
779
799
|
retryAfter: import("drizzle-orm/pg-core").PgColumn<{
|
|
780
800
|
name: "retry_after";
|
|
781
801
|
tableName: "workflow_steps";
|
|
782
|
-
dataType: "
|
|
783
|
-
columnType: "
|
|
802
|
+
dataType: "custom";
|
|
803
|
+
columnType: "PgCustomColumn";
|
|
784
804
|
data: Date;
|
|
785
|
-
driverParam: string;
|
|
805
|
+
driverParam: string | Date;
|
|
786
806
|
notNull: false;
|
|
787
807
|
hasDefault: false;
|
|
788
808
|
isPrimaryKey: false;
|
|
@@ -792,7 +812,9 @@ export declare const steps: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
792
812
|
baseColumn: never;
|
|
793
813
|
identity: undefined;
|
|
794
814
|
generated: undefined;
|
|
795
|
-
}, {}, {
|
|
815
|
+
}, {}, {
|
|
816
|
+
pgColumnBuilderBrand: "PgCustomColumnBuilderBrand";
|
|
817
|
+
}>;
|
|
796
818
|
specVersion: import("drizzle-orm/pg-core").PgColumn<{
|
|
797
819
|
name: "spec_version";
|
|
798
820
|
tableName: "workflow_steps";
|
|
@@ -934,10 +956,10 @@ export declare const hooks: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
934
956
|
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
935
957
|
name: "created_at";
|
|
936
958
|
tableName: "workflow_hooks";
|
|
937
|
-
dataType: "
|
|
938
|
-
columnType: "
|
|
959
|
+
dataType: "custom";
|
|
960
|
+
columnType: "PgCustomColumn";
|
|
939
961
|
data: Date;
|
|
940
|
-
driverParam: string;
|
|
962
|
+
driverParam: string | Date;
|
|
941
963
|
notNull: true;
|
|
942
964
|
hasDefault: true;
|
|
943
965
|
isPrimaryKey: false;
|
|
@@ -947,7 +969,9 @@ export declare const hooks: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
947
969
|
baseColumn: never;
|
|
948
970
|
identity: undefined;
|
|
949
971
|
generated: undefined;
|
|
950
|
-
}, {}, {
|
|
972
|
+
}, {}, {
|
|
973
|
+
pgColumnBuilderBrand: "PgCustomColumnBuilderBrand";
|
|
974
|
+
}>;
|
|
951
975
|
metadataJson: import("drizzle-orm/pg-core").PgColumn<{
|
|
952
976
|
name: "metadata";
|
|
953
977
|
tableName: "workflow_hooks";
|
|
@@ -1085,10 +1109,10 @@ export declare const waits: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
1085
1109
|
resumeAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
1086
1110
|
name: "resume_at";
|
|
1087
1111
|
tableName: "workflow_waits";
|
|
1088
|
-
dataType: "
|
|
1089
|
-
columnType: "
|
|
1112
|
+
dataType: "custom";
|
|
1113
|
+
columnType: "PgCustomColumn";
|
|
1090
1114
|
data: Date;
|
|
1091
|
-
driverParam: string;
|
|
1115
|
+
driverParam: string | Date;
|
|
1092
1116
|
notNull: false;
|
|
1093
1117
|
hasDefault: false;
|
|
1094
1118
|
isPrimaryKey: false;
|
|
@@ -1098,14 +1122,16 @@ export declare const waits: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
1098
1122
|
baseColumn: never;
|
|
1099
1123
|
identity: undefined;
|
|
1100
1124
|
generated: undefined;
|
|
1101
|
-
}, {}, {
|
|
1125
|
+
}, {}, {
|
|
1126
|
+
pgColumnBuilderBrand: "PgCustomColumnBuilderBrand";
|
|
1127
|
+
}>;
|
|
1102
1128
|
completedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
1103
1129
|
name: "completed_at";
|
|
1104
1130
|
tableName: "workflow_waits";
|
|
1105
|
-
dataType: "
|
|
1106
|
-
columnType: "
|
|
1131
|
+
dataType: "custom";
|
|
1132
|
+
columnType: "PgCustomColumn";
|
|
1107
1133
|
data: Date;
|
|
1108
|
-
driverParam: string;
|
|
1134
|
+
driverParam: string | Date;
|
|
1109
1135
|
notNull: false;
|
|
1110
1136
|
hasDefault: false;
|
|
1111
1137
|
isPrimaryKey: false;
|
|
@@ -1115,14 +1141,16 @@ export declare const waits: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
1115
1141
|
baseColumn: never;
|
|
1116
1142
|
identity: undefined;
|
|
1117
1143
|
generated: undefined;
|
|
1118
|
-
}, {}, {
|
|
1144
|
+
}, {}, {
|
|
1145
|
+
pgColumnBuilderBrand: "PgCustomColumnBuilderBrand";
|
|
1146
|
+
}>;
|
|
1119
1147
|
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
1120
1148
|
name: "created_at";
|
|
1121
1149
|
tableName: "workflow_waits";
|
|
1122
|
-
dataType: "
|
|
1123
|
-
columnType: "
|
|
1150
|
+
dataType: "custom";
|
|
1151
|
+
columnType: "PgCustomColumn";
|
|
1124
1152
|
data: Date;
|
|
1125
|
-
driverParam: string;
|
|
1153
|
+
driverParam: string | Date;
|
|
1126
1154
|
notNull: true;
|
|
1127
1155
|
hasDefault: true;
|
|
1128
1156
|
isPrimaryKey: false;
|
|
@@ -1132,14 +1160,16 @@ export declare const waits: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
1132
1160
|
baseColumn: never;
|
|
1133
1161
|
identity: undefined;
|
|
1134
1162
|
generated: undefined;
|
|
1135
|
-
}, {}, {
|
|
1163
|
+
}, {}, {
|
|
1164
|
+
pgColumnBuilderBrand: "PgCustomColumnBuilderBrand";
|
|
1165
|
+
}>;
|
|
1136
1166
|
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
1137
1167
|
name: "updated_at";
|
|
1138
1168
|
tableName: "workflow_waits";
|
|
1139
|
-
dataType: "
|
|
1140
|
-
columnType: "
|
|
1169
|
+
dataType: "custom";
|
|
1170
|
+
columnType: "PgCustomColumn";
|
|
1141
1171
|
data: Date;
|
|
1142
|
-
driverParam: string;
|
|
1172
|
+
driverParam: string | Date;
|
|
1143
1173
|
notNull: true;
|
|
1144
1174
|
hasDefault: true;
|
|
1145
1175
|
isPrimaryKey: false;
|
|
@@ -1149,7 +1179,9 @@ export declare const waits: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
1149
1179
|
baseColumn: never;
|
|
1150
1180
|
identity: undefined;
|
|
1151
1181
|
generated: undefined;
|
|
1152
|
-
}, {}, {
|
|
1182
|
+
}, {}, {
|
|
1183
|
+
pgColumnBuilderBrand: "PgCustomColumnBuilderBrand";
|
|
1184
|
+
}>;
|
|
1153
1185
|
specVersion: import("drizzle-orm/pg-core").PgColumn<{
|
|
1154
1186
|
name: "spec_version";
|
|
1155
1187
|
tableName: "workflow_waits";
|
|
@@ -1254,10 +1286,10 @@ export declare const streams: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
1254
1286
|
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
1255
1287
|
name: "created_at";
|
|
1256
1288
|
tableName: "workflow_stream_chunks";
|
|
1257
|
-
dataType: "
|
|
1258
|
-
columnType: "
|
|
1289
|
+
dataType: "custom";
|
|
1290
|
+
columnType: "PgCustomColumn";
|
|
1259
1291
|
data: Date;
|
|
1260
|
-
driverParam: string;
|
|
1292
|
+
driverParam: string | Date;
|
|
1261
1293
|
notNull: true;
|
|
1262
1294
|
hasDefault: true;
|
|
1263
1295
|
isPrimaryKey: false;
|
|
@@ -1267,7 +1299,9 @@ export declare const streams: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
1267
1299
|
baseColumn: never;
|
|
1268
1300
|
identity: undefined;
|
|
1269
1301
|
generated: undefined;
|
|
1270
|
-
}, {}, {
|
|
1302
|
+
}, {}, {
|
|
1303
|
+
pgColumnBuilderBrand: "PgCustomColumnBuilderBrand";
|
|
1304
|
+
}>;
|
|
1271
1305
|
eof: import("drizzle-orm/pg-core").PgColumn<{
|
|
1272
1306
|
name: "eof";
|
|
1273
1307
|
tableName: "workflow_stream_chunks";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/drizzle/schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/drizzle/schema.ts"],"names":[],"mappings":"AA2BA,eAAO,MAAM,MAAM,oDAAuB,CAAC;AA8B3C,eAAO,MAAM,iBAAiB,2KAG7B,CAAC;AAEF,eAAO,MAAM,UAAU,2KAGtB,CAAC;AAEF,eAAO,MAAM,UAAU,iGAGtB,CAAC;AAYF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,GAAG,EAAE,CAAC;AAEtC,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoChB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BlB,CAAC;AAEF,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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