@remit/drizzle-pg-schema 0.0.7 → 0.0.9
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/dist/schema.d.ts +10 -10
- package/dist/schema.js +11 -10
- package/package.json +1 -1
- package/schema.ts +11 -10
package/dist/schema.d.ts
CHANGED
|
@@ -1010,7 +1010,7 @@ export declare const accounts: import("drizzle-orm/pg-core").PgTableWithColumns<
|
|
|
1010
1010
|
data: number;
|
|
1011
1011
|
driverParam: string | number;
|
|
1012
1012
|
notNull: true;
|
|
1013
|
-
hasDefault:
|
|
1013
|
+
hasDefault: true;
|
|
1014
1014
|
isPrimaryKey: false;
|
|
1015
1015
|
isAutoincrement: false;
|
|
1016
1016
|
hasRuntimeDefault: false;
|
|
@@ -2255,7 +2255,7 @@ export declare const organizeJobRequests: import("drizzle-orm/pg-core").PgTableW
|
|
|
2255
2255
|
data: number;
|
|
2256
2256
|
driverParam: string | number;
|
|
2257
2257
|
notNull: true;
|
|
2258
|
-
hasDefault:
|
|
2258
|
+
hasDefault: true;
|
|
2259
2259
|
isPrimaryKey: false;
|
|
2260
2260
|
isAutoincrement: false;
|
|
2261
2261
|
hasRuntimeDefault: false;
|
|
@@ -2306,7 +2306,7 @@ export declare const organizeJobRequests: import("drizzle-orm/pg-core").PgTableW
|
|
|
2306
2306
|
data: number;
|
|
2307
2307
|
driverParam: string | number;
|
|
2308
2308
|
notNull: true;
|
|
2309
|
-
hasDefault:
|
|
2309
|
+
hasDefault: true;
|
|
2310
2310
|
isPrimaryKey: false;
|
|
2311
2311
|
isAutoincrement: false;
|
|
2312
2312
|
hasRuntimeDefault: false;
|
|
@@ -2323,7 +2323,7 @@ export declare const organizeJobRequests: import("drizzle-orm/pg-core").PgTableW
|
|
|
2323
2323
|
data: number;
|
|
2324
2324
|
driverParam: string | number;
|
|
2325
2325
|
notNull: true;
|
|
2326
|
-
hasDefault:
|
|
2326
|
+
hasDefault: true;
|
|
2327
2327
|
isPrimaryKey: false;
|
|
2328
2328
|
isAutoincrement: false;
|
|
2329
2329
|
hasRuntimeDefault: false;
|
|
@@ -2340,7 +2340,7 @@ export declare const organizeJobRequests: import("drizzle-orm/pg-core").PgTableW
|
|
|
2340
2340
|
data: number;
|
|
2341
2341
|
driverParam: string | number;
|
|
2342
2342
|
notNull: true;
|
|
2343
|
-
hasDefault:
|
|
2343
|
+
hasDefault: true;
|
|
2344
2344
|
isPrimaryKey: false;
|
|
2345
2345
|
isAutoincrement: false;
|
|
2346
2346
|
hasRuntimeDefault: false;
|
|
@@ -3406,7 +3406,7 @@ export declare const addresses: import("drizzle-orm/pg-core").PgTableWithColumns
|
|
|
3406
3406
|
data: number;
|
|
3407
3407
|
driverParam: string | number;
|
|
3408
3408
|
notNull: true;
|
|
3409
|
-
hasDefault:
|
|
3409
|
+
hasDefault: true;
|
|
3410
3410
|
isPrimaryKey: false;
|
|
3411
3411
|
isAutoincrement: false;
|
|
3412
3412
|
hasRuntimeDefault: false;
|
|
@@ -3423,7 +3423,7 @@ export declare const addresses: import("drizzle-orm/pg-core").PgTableWithColumns
|
|
|
3423
3423
|
data: number;
|
|
3424
3424
|
driverParam: string | number;
|
|
3425
3425
|
notNull: true;
|
|
3426
|
-
hasDefault:
|
|
3426
|
+
hasDefault: true;
|
|
3427
3427
|
isPrimaryKey: false;
|
|
3428
3428
|
isAutoincrement: false;
|
|
3429
3429
|
hasRuntimeDefault: false;
|
|
@@ -3440,7 +3440,7 @@ export declare const addresses: import("drizzle-orm/pg-core").PgTableWithColumns
|
|
|
3440
3440
|
data: number;
|
|
3441
3441
|
driverParam: string | number;
|
|
3442
3442
|
notNull: true;
|
|
3443
|
-
hasDefault:
|
|
3443
|
+
hasDefault: true;
|
|
3444
3444
|
isPrimaryKey: false;
|
|
3445
3445
|
isAutoincrement: false;
|
|
3446
3446
|
hasRuntimeDefault: false;
|
|
@@ -3457,7 +3457,7 @@ export declare const addresses: import("drizzle-orm/pg-core").PgTableWithColumns
|
|
|
3457
3457
|
data: number;
|
|
3458
3458
|
driverParam: string | number;
|
|
3459
3459
|
notNull: true;
|
|
3460
|
-
hasDefault:
|
|
3460
|
+
hasDefault: true;
|
|
3461
3461
|
isPrimaryKey: false;
|
|
3462
3462
|
isAutoincrement: false;
|
|
3463
3463
|
hasRuntimeDefault: false;
|
|
@@ -3493,7 +3493,7 @@ export declare const addresses: import("drizzle-orm/pg-core").PgTableWithColumns
|
|
|
3493
3493
|
data: number;
|
|
3494
3494
|
driverParam: string | number;
|
|
3495
3495
|
notNull: true;
|
|
3496
|
-
hasDefault:
|
|
3496
|
+
hasDefault: true;
|
|
3497
3497
|
isPrimaryKey: false;
|
|
3498
3498
|
isAutoincrement: false;
|
|
3499
3499
|
hasRuntimeDefault: false;
|
package/dist/schema.js
CHANGED
|
@@ -68,7 +68,7 @@ export const accounts = pgTable("account", {
|
|
|
68
68
|
imapStartTls: boolean("imap_start_tls").notNull(),
|
|
69
69
|
smtpEnabled: boolean("smtp_enabled").notNull().default(false),
|
|
70
70
|
smtpHost: text("smtp_host").notNull().default(""),
|
|
71
|
-
smtpPort: integer("smtp_port").notNull(),
|
|
71
|
+
smtpPort: integer("smtp_port").notNull().default(587),
|
|
72
72
|
smtpTls: boolean("smtp_tls").notNull().default(false),
|
|
73
73
|
smtpStartTls: boolean("smtp_start_tls").notNull().default(true),
|
|
74
74
|
smtpUsername: text("smtp_username").notNull().default(""),
|
|
@@ -155,12 +155,12 @@ export const organizeJobRequests = pgTable("organize_job_request", {
|
|
|
155
155
|
anchorMessageId: text("anchor_message_id").notNull().default("None"),
|
|
156
156
|
matchOperator: text("match_operator").$type().notNull().default("And"),
|
|
157
157
|
literalClauses: jsonb("literal_clauses").notNull().default([]),
|
|
158
|
-
similarityThreshold: doublePrecision("similarity_threshold").notNull(),
|
|
158
|
+
similarityThreshold: doublePrecision("similarity_threshold").notNull().default(0.75),
|
|
159
159
|
actionLabelId: text("action_label_id").notNull().default("None"),
|
|
160
160
|
actionMailboxId: text("action_mailbox_id").notNull().default("None"),
|
|
161
|
-
matchedCount: integer("matched_count").notNull(),
|
|
162
|
-
appliedCount: integer("applied_count").notNull(),
|
|
163
|
-
failedCount: integer("failed_count").notNull(),
|
|
161
|
+
matchedCount: integer("matched_count").notNull().default(0),
|
|
162
|
+
appliedCount: integer("applied_count").notNull().default(0),
|
|
163
|
+
failedCount: integer("failed_count").notNull().default(0),
|
|
164
164
|
errorMessage: text("error_message").notNull().default(""),
|
|
165
165
|
ttl: bigint("ttl", { mode: "number" }).notNull(),
|
|
166
166
|
createdAt: bigint("created_at", { mode: "number" }).notNull(),
|
|
@@ -203,6 +203,7 @@ export const threadMessages = pgTable("thread_message", {
|
|
|
203
203
|
index("thread_message_by_message_id").on(table.messageId),
|
|
204
204
|
index("thread_message_by_thread_id").on(table.threadId, table.sentDate),
|
|
205
205
|
index("thread_message_primary").on(table.accountConfigId, table.threadMessageId),
|
|
206
|
+
index("tm_by_mailbox_category_date").on(table.accountConfigId, table.mailboxId, table.category, table.isDeleted, table.sentDate),
|
|
206
207
|
]);
|
|
207
208
|
export const outboxMessages = pgTable("outbox_message", {
|
|
208
209
|
outboxMessageId: text("outbox_message_id").primaryKey().$defaultFn(() => generateBase36Id()),
|
|
@@ -239,12 +240,12 @@ export const addresses = pgTable("address", {
|
|
|
239
240
|
normalizedEmail: text("normalized_email").notNull(),
|
|
240
241
|
normalizedCompound: text("normalized_compound").notNull(),
|
|
241
242
|
flags: jsonb("flags").notNull(),
|
|
242
|
-
inboundCount: integer("inbound_count").notNull(),
|
|
243
|
-
outboundCount: integer("outbound_count").notNull(),
|
|
244
|
-
replyCount: integer("reply_count").notNull(),
|
|
245
|
-
lastInboundAt: bigint("last_inbound_at", { mode: "number" }).notNull(),
|
|
243
|
+
inboundCount: integer("inbound_count").notNull().default(0),
|
|
244
|
+
outboundCount: integer("outbound_count").notNull().default(0),
|
|
245
|
+
replyCount: integer("reply_count").notNull().default(0),
|
|
246
|
+
lastInboundAt: bigint("last_inbound_at", { mode: "number" }).notNull().default(0),
|
|
246
247
|
lastOutboundAt: nullableBigint("last_outbound_at"),
|
|
247
|
-
lastReplyAt: bigint("last_reply_at", { mode: "number" }).notNull(),
|
|
248
|
+
lastReplyAt: bigint("last_reply_at", { mode: "number" }).notNull().default(0),
|
|
248
249
|
createdAt: bigint("created_at", { mode: "number" }).notNull(),
|
|
249
250
|
updatedAt: bigint("updated_at", { mode: "number" }).notNull(),
|
|
250
251
|
}, (table) => [
|
package/package.json
CHANGED
package/schema.ts
CHANGED
|
@@ -86,7 +86,7 @@ export const accounts = pgTable(
|
|
|
86
86
|
imapStartTls: boolean("imap_start_tls").notNull(),
|
|
87
87
|
smtpEnabled: boolean("smtp_enabled").notNull().default(false),
|
|
88
88
|
smtpHost: text("smtp_host").notNull().default(""),
|
|
89
|
-
smtpPort: integer("smtp_port").notNull(),
|
|
89
|
+
smtpPort: integer("smtp_port").notNull().default(587),
|
|
90
90
|
smtpTls: boolean("smtp_tls").notNull().default(false),
|
|
91
91
|
smtpStartTls: boolean("smtp_start_tls").notNull().default(true),
|
|
92
92
|
smtpUsername: text("smtp_username").notNull().default(""),
|
|
@@ -193,12 +193,12 @@ export const organizeJobRequests = pgTable(
|
|
|
193
193
|
anchorMessageId: text("anchor_message_id").notNull().default("None"),
|
|
194
194
|
matchOperator: text("match_operator").$type<"And" | "Or">().notNull().default("And"),
|
|
195
195
|
literalClauses: jsonb("literal_clauses").notNull().default([]),
|
|
196
|
-
similarityThreshold: doublePrecision("similarity_threshold").notNull(),
|
|
196
|
+
similarityThreshold: doublePrecision("similarity_threshold").notNull().default(0.75),
|
|
197
197
|
actionLabelId: text("action_label_id").notNull().default("None"),
|
|
198
198
|
actionMailboxId: text("action_mailbox_id").notNull().default("None"),
|
|
199
|
-
matchedCount: integer("matched_count").notNull(),
|
|
200
|
-
appliedCount: integer("applied_count").notNull(),
|
|
201
|
-
failedCount: integer("failed_count").notNull(),
|
|
199
|
+
matchedCount: integer("matched_count").notNull().default(0),
|
|
200
|
+
appliedCount: integer("applied_count").notNull().default(0),
|
|
201
|
+
failedCount: integer("failed_count").notNull().default(0),
|
|
202
202
|
errorMessage: text("error_message").notNull().default(""),
|
|
203
203
|
ttl: bigint("ttl", { mode: "number" }).notNull(),
|
|
204
204
|
createdAt: bigint("created_at", { mode: "number" }).notNull(),
|
|
@@ -247,6 +247,7 @@ export const threadMessages = pgTable(
|
|
|
247
247
|
index("thread_message_by_message_id").on(table.messageId),
|
|
248
248
|
index("thread_message_by_thread_id").on(table.threadId, table.sentDate),
|
|
249
249
|
index("thread_message_primary").on(table.accountConfigId, table.threadMessageId),
|
|
250
|
+
index("tm_by_mailbox_category_date").on(table.accountConfigId, table.mailboxId, table.category, table.isDeleted, table.sentDate),
|
|
250
251
|
],
|
|
251
252
|
);
|
|
252
253
|
|
|
@@ -292,12 +293,12 @@ export const addresses = pgTable(
|
|
|
292
293
|
normalizedEmail: text("normalized_email").notNull(),
|
|
293
294
|
normalizedCompound: text("normalized_compound").notNull(),
|
|
294
295
|
flags: jsonb("flags").notNull(),
|
|
295
|
-
inboundCount: integer("inbound_count").notNull(),
|
|
296
|
-
outboundCount: integer("outbound_count").notNull(),
|
|
297
|
-
replyCount: integer("reply_count").notNull(),
|
|
298
|
-
lastInboundAt: bigint("last_inbound_at", { mode: "number" }).notNull(),
|
|
296
|
+
inboundCount: integer("inbound_count").notNull().default(0),
|
|
297
|
+
outboundCount: integer("outbound_count").notNull().default(0),
|
|
298
|
+
replyCount: integer("reply_count").notNull().default(0),
|
|
299
|
+
lastInboundAt: bigint("last_inbound_at", { mode: "number" }).notNull().default(0),
|
|
299
300
|
lastOutboundAt: nullableBigint("last_outbound_at"),
|
|
300
|
-
lastReplyAt: bigint("last_reply_at", { mode: "number" }).notNull(),
|
|
301
|
+
lastReplyAt: bigint("last_reply_at", { mode: "number" }).notNull().default(0),
|
|
301
302
|
createdAt: bigint("created_at", { mode: "number" }).notNull(),
|
|
302
303
|
updatedAt: bigint("updated_at", { mode: "number" }).notNull(),
|
|
303
304
|
},
|