@dvsa/cvs-db-schemas 0.1.2 → 0.2.0

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.
@@ -2,18 +2,18 @@
2
2
  * @generated-schema-doc
3
3
  * Schema: `outbox` | Table: `outbox`
4
4
  *
5
- * | Column | Type | Nullable | Constraints |
6
- * | ------------- | ------------------------------------------------------ | -------- | -------------------------- |
7
- * | id | serial | No | PK, NOT NULL |
8
- * | eventType | enum(created, updated, deleted) | No | NOT NULL |
9
- * | aggregateType | enum(activity, tech-record, test-result, test-station) | No | NOT NULL |
10
- * | payload | json | No | NOT NULL |
11
- * | status | enum(pending, completed, failed) | No | NOT NULL, default: pending |
12
- * | attemptCount | int | No | NOT NULL, default: 0 |
13
- * | createdAt | datetime(3) | Yes | default: sql`(now(3 |
14
- * | updatedAt | datetime(3) | Yes | default: sql`(now(3 |
15
- * | errorMessage | text | Yes | |
16
- * | completedAt | datetime | Yes | |
5
+ * | Column | Type | Nullable | Constraints |
6
+ * | ------------- | ------------------------------------------ | -------- | -------------------------- |
7
+ * | id | serial | No | PK, NOT NULL |
8
+ * | eventType | enum(created, updated, deleted) | No | NOT NULL |
9
+ * | aggregateType | enum(activity, tech-record, test-result) | No | NOT NULL |
10
+ * | payload | json | No | NOT NULL |
11
+ * | status | enum(pending, processing, created, failed) | No | NOT NULL, default: pending |
12
+ * | attemptCount | int | No | NOT NULL, default: 0 |
13
+ * | createdAt | datetime(3) | Yes | default: sql`(now(3 |
14
+ * | updatedAt | datetime(3) | Yes | default: sql`(now(3 |
15
+ * | errorMessage | text | Yes | |
16
+ * | completedAt | datetime | Yes | |
17
17
  */
18
18
  export declare const outbox: import("drizzle-orm/mysql-core").MySqlTableWithColumns<{
19
19
  name: "outbox";
@@ -58,14 +58,14 @@ export declare const outbox: import("drizzle-orm/mysql-core").MySqlTableWithColu
58
58
  tableName: "outbox";
59
59
  dataType: "string";
60
60
  columnType: "MySqlEnumColumn";
61
- data: "activity" | "tech-record" | "test-result" | "test-station";
61
+ data: "activity" | "tech-record" | "test-result";
62
62
  driverParam: string;
63
63
  notNull: true;
64
64
  hasDefault: false;
65
65
  isPrimaryKey: false;
66
66
  isAutoincrement: false;
67
67
  hasRuntimeDefault: false;
68
- enumValues: ["activity", "tech-record", "test-result", "test-station"];
68
+ enumValues: ["activity", "tech-record", "test-result"];
69
69
  baseColumn: never;
70
70
  identity: undefined;
71
71
  generated: undefined;
@@ -92,14 +92,14 @@ export declare const outbox: import("drizzle-orm/mysql-core").MySqlTableWithColu
92
92
  tableName: "outbox";
93
93
  dataType: "string";
94
94
  columnType: "MySqlEnumColumn";
95
- data: "pending" | "completed" | "failed";
95
+ data: "created" | "pending" | "processing" | "failed";
96
96
  driverParam: string;
97
97
  notNull: true;
98
98
  hasDefault: true;
99
99
  isPrimaryKey: false;
100
100
  isAutoincrement: false;
101
101
  hasRuntimeDefault: false;
102
- enumValues: ["pending", "completed", "failed"];
102
+ enumValues: ["pending", "processing", "created", "failed"];
103
103
  baseColumn: never;
104
104
  identity: undefined;
105
105
  generated: undefined;
package/outbox/outbox.js CHANGED
@@ -8,25 +8,25 @@ const format_schema_name_1 = require("../helper/format-schema-name");
8
8
  * @generated-schema-doc
9
9
  * Schema: `outbox` | Table: `outbox`
10
10
  *
11
- * | Column | Type | Nullable | Constraints |
12
- * | ------------- | ------------------------------------------------------ | -------- | -------------------------- |
13
- * | id | serial | No | PK, NOT NULL |
14
- * | eventType | enum(created, updated, deleted) | No | NOT NULL |
15
- * | aggregateType | enum(activity, tech-record, test-result, test-station) | No | NOT NULL |
16
- * | payload | json | No | NOT NULL |
17
- * | status | enum(pending, completed, failed) | No | NOT NULL, default: pending |
18
- * | attemptCount | int | No | NOT NULL, default: 0 |
19
- * | createdAt | datetime(3) | Yes | default: sql`(now(3 |
20
- * | updatedAt | datetime(3) | Yes | default: sql`(now(3 |
21
- * | errorMessage | text | Yes | |
22
- * | completedAt | datetime | Yes | |
11
+ * | Column | Type | Nullable | Constraints |
12
+ * | ------------- | ------------------------------------------ | -------- | -------------------------- |
13
+ * | id | serial | No | PK, NOT NULL |
14
+ * | eventType | enum(created, updated, deleted) | No | NOT NULL |
15
+ * | aggregateType | enum(activity, tech-record, test-result) | No | NOT NULL |
16
+ * | payload | json | No | NOT NULL |
17
+ * | status | enum(pending, processing, created, failed) | No | NOT NULL, default: pending |
18
+ * | attemptCount | int | No | NOT NULL, default: 0 |
19
+ * | createdAt | datetime(3) | Yes | default: sql`(now(3 |
20
+ * | updatedAt | datetime(3) | Yes | default: sql`(now(3 |
21
+ * | errorMessage | text | Yes | |
22
+ * | completedAt | datetime | Yes | |
23
23
  */
24
24
  exports.outbox = (0, mysql_core_1.mysqlSchema)((0, format_schema_name_1.formatSchemaName)('outbox')).table('outbox', {
25
25
  id: (0, mysql_core_1.serial)().notNull().primaryKey(),
26
26
  eventType: (0, mysql_core_1.mysqlEnum)('event_type', ['created', 'updated', 'deleted']).notNull(),
27
- aggregateType: (0, mysql_core_1.mysqlEnum)('aggregate_type', ['activity', 'tech-record', 'test-result', 'test-station']).notNull(),
27
+ aggregateType: (0, mysql_core_1.mysqlEnum)('aggregate_type', ['activity', 'tech-record', 'test-result']).notNull(),
28
28
  payload: (0, mysql_core_1.json)().notNull(),
29
- status: (0, mysql_core_1.mysqlEnum)('status', ['pending', 'completed', 'failed']).notNull().default('pending'),
29
+ status: (0, mysql_core_1.mysqlEnum)('status', ['pending', 'processing', 'created', 'failed']).notNull().default('pending'),
30
30
  attemptCount: (0, mysql_core_1.int)('attempt_count').notNull().default(0),
31
31
  createdAt: (0, mysql_core_1.datetime)('created_at', { mode: 'string', fsp: 3 }).default((0, drizzle_orm_1.sql) `(now(3))`),
32
32
  updatedAt: (0, mysql_core_1.datetime)('updated_at', { mode: 'string', fsp: 3 }).default((0, drizzle_orm_1.sql) `(now(3))`),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dvsa/cvs-db-schemas",
3
- "version": "0.1.2",
3
+ "version": "0.2.0",
4
4
  "description": "CVS Drizzle Schema Common Package",
5
5
  "author": "DVSA",
6
6
  "license": "ISC",