@remit/drizzle-sqlite-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
|
@@ -1042,7 +1042,7 @@ export declare const accounts: import("drizzle-orm/sqlite-core").SQLiteTableWith
|
|
|
1042
1042
|
data: number;
|
|
1043
1043
|
driverParam: number;
|
|
1044
1044
|
notNull: true;
|
|
1045
|
-
hasDefault:
|
|
1045
|
+
hasDefault: true;
|
|
1046
1046
|
isPrimaryKey: false;
|
|
1047
1047
|
isAutoincrement: false;
|
|
1048
1048
|
hasRuntimeDefault: false;
|
|
@@ -2330,7 +2330,7 @@ export declare const organizeJobRequests: import("drizzle-orm/sqlite-core").SQLi
|
|
|
2330
2330
|
data: number;
|
|
2331
2331
|
driverParam: number;
|
|
2332
2332
|
notNull: true;
|
|
2333
|
-
hasDefault:
|
|
2333
|
+
hasDefault: true;
|
|
2334
2334
|
isPrimaryKey: false;
|
|
2335
2335
|
isAutoincrement: false;
|
|
2336
2336
|
hasRuntimeDefault: false;
|
|
@@ -2385,7 +2385,7 @@ export declare const organizeJobRequests: import("drizzle-orm/sqlite-core").SQLi
|
|
|
2385
2385
|
data: number;
|
|
2386
2386
|
driverParam: number;
|
|
2387
2387
|
notNull: true;
|
|
2388
|
-
hasDefault:
|
|
2388
|
+
hasDefault: true;
|
|
2389
2389
|
isPrimaryKey: false;
|
|
2390
2390
|
isAutoincrement: false;
|
|
2391
2391
|
hasRuntimeDefault: false;
|
|
@@ -2402,7 +2402,7 @@ export declare const organizeJobRequests: import("drizzle-orm/sqlite-core").SQLi
|
|
|
2402
2402
|
data: number;
|
|
2403
2403
|
driverParam: number;
|
|
2404
2404
|
notNull: true;
|
|
2405
|
-
hasDefault:
|
|
2405
|
+
hasDefault: true;
|
|
2406
2406
|
isPrimaryKey: false;
|
|
2407
2407
|
isAutoincrement: false;
|
|
2408
2408
|
hasRuntimeDefault: false;
|
|
@@ -2419,7 +2419,7 @@ export declare const organizeJobRequests: import("drizzle-orm/sqlite-core").SQLi
|
|
|
2419
2419
|
data: number;
|
|
2420
2420
|
driverParam: number;
|
|
2421
2421
|
notNull: true;
|
|
2422
|
-
hasDefault:
|
|
2422
|
+
hasDefault: true;
|
|
2423
2423
|
isPrimaryKey: false;
|
|
2424
2424
|
isAutoincrement: false;
|
|
2425
2425
|
hasRuntimeDefault: false;
|
|
@@ -3520,7 +3520,7 @@ export declare const addresses: import("drizzle-orm/sqlite-core").SQLiteTableWit
|
|
|
3520
3520
|
data: number;
|
|
3521
3521
|
driverParam: number;
|
|
3522
3522
|
notNull: true;
|
|
3523
|
-
hasDefault:
|
|
3523
|
+
hasDefault: true;
|
|
3524
3524
|
isPrimaryKey: false;
|
|
3525
3525
|
isAutoincrement: false;
|
|
3526
3526
|
hasRuntimeDefault: false;
|
|
@@ -3537,7 +3537,7 @@ export declare const addresses: import("drizzle-orm/sqlite-core").SQLiteTableWit
|
|
|
3537
3537
|
data: number;
|
|
3538
3538
|
driverParam: number;
|
|
3539
3539
|
notNull: true;
|
|
3540
|
-
hasDefault:
|
|
3540
|
+
hasDefault: true;
|
|
3541
3541
|
isPrimaryKey: false;
|
|
3542
3542
|
isAutoincrement: false;
|
|
3543
3543
|
hasRuntimeDefault: false;
|
|
@@ -3554,7 +3554,7 @@ export declare const addresses: import("drizzle-orm/sqlite-core").SQLiteTableWit
|
|
|
3554
3554
|
data: number;
|
|
3555
3555
|
driverParam: number;
|
|
3556
3556
|
notNull: true;
|
|
3557
|
-
hasDefault:
|
|
3557
|
+
hasDefault: true;
|
|
3558
3558
|
isPrimaryKey: false;
|
|
3559
3559
|
isAutoincrement: false;
|
|
3560
3560
|
hasRuntimeDefault: false;
|
|
@@ -3571,7 +3571,7 @@ export declare const addresses: import("drizzle-orm/sqlite-core").SQLiteTableWit
|
|
|
3571
3571
|
data: number;
|
|
3572
3572
|
driverParam: number;
|
|
3573
3573
|
notNull: true;
|
|
3574
|
-
hasDefault:
|
|
3574
|
+
hasDefault: true;
|
|
3575
3575
|
isPrimaryKey: false;
|
|
3576
3576
|
isAutoincrement: false;
|
|
3577
3577
|
hasRuntimeDefault: false;
|
|
@@ -3605,7 +3605,7 @@ export declare const addresses: import("drizzle-orm/sqlite-core").SQLiteTableWit
|
|
|
3605
3605
|
data: number;
|
|
3606
3606
|
driverParam: number;
|
|
3607
3607
|
notNull: true;
|
|
3608
|
-
hasDefault:
|
|
3608
|
+
hasDefault: true;
|
|
3609
3609
|
isPrimaryKey: false;
|
|
3610
3610
|
isAutoincrement: false;
|
|
3611
3611
|
hasRuntimeDefault: false;
|
package/dist/schema.js
CHANGED
|
@@ -68,7 +68,7 @@ export const accounts = sqliteTable("account", {
|
|
|
68
68
|
imapStartTls: integer("imap_start_tls", { mode: "boolean" }).notNull(),
|
|
69
69
|
smtpEnabled: integer("smtp_enabled", { mode: "boolean" }).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: integer("smtp_tls", { mode: "boolean" }).notNull().default(false),
|
|
73
73
|
smtpStartTls: integer("smtp_start_tls", { mode: "boolean" }).notNull().default(true),
|
|
74
74
|
smtpUsername: text("smtp_username").notNull().default(""),
|
|
@@ -155,12 +155,12 @@ export const organizeJobRequests = sqliteTable("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: text("literal_clauses", { mode: "json" }).notNull().default([]),
|
|
158
|
-
similarityThreshold: real("similarity_threshold").notNull(),
|
|
158
|
+
similarityThreshold: real("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: integer("ttl", { mode: "number" }).notNull(),
|
|
166
166
|
createdAt: integer("created_at", { mode: "number" }).notNull(),
|
|
@@ -203,6 +203,7 @@ export const threadMessages = sqliteTable("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 = sqliteTable("outbox_message", {
|
|
208
209
|
outboxMessageId: text("outbox_message_id").primaryKey().$defaultFn(() => generateBase36Id()),
|
|
@@ -239,12 +240,12 @@ export const addresses = sqliteTable("address", {
|
|
|
239
240
|
normalizedEmail: text("normalized_email").notNull(),
|
|
240
241
|
normalizedCompound: text("normalized_compound").notNull(),
|
|
241
242
|
flags: text("flags", { mode: "json" }).notNull(),
|
|
242
|
-
inboundCount: integer("inbound_count").notNull(),
|
|
243
|
-
outboundCount: integer("outbound_count").notNull(),
|
|
244
|
-
replyCount: integer("reply_count").notNull(),
|
|
245
|
-
lastInboundAt: integer("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: integer("last_inbound_at", { mode: "number" }).notNull().default(0),
|
|
246
247
|
lastOutboundAt: integer("last_outbound_at", { mode: "number" }),
|
|
247
|
-
lastReplyAt: integer("last_reply_at", { mode: "number" }).notNull(),
|
|
248
|
+
lastReplyAt: integer("last_reply_at", { mode: "number" }).notNull().default(0),
|
|
248
249
|
createdAt: integer("created_at", { mode: "number" }).notNull(),
|
|
249
250
|
updatedAt: integer("updated_at", { mode: "number" }).notNull(),
|
|
250
251
|
}, (table) => [
|
package/package.json
CHANGED
package/schema.ts
CHANGED
|
@@ -86,7 +86,7 @@ export const accounts = sqliteTable(
|
|
|
86
86
|
imapStartTls: integer("imap_start_tls", { mode: "boolean" }).notNull(),
|
|
87
87
|
smtpEnabled: integer("smtp_enabled", { mode: "boolean" }).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: integer("smtp_tls", { mode: "boolean" }).notNull().default(false),
|
|
91
91
|
smtpStartTls: integer("smtp_start_tls", { mode: "boolean" }).notNull().default(true),
|
|
92
92
|
smtpUsername: text("smtp_username").notNull().default(""),
|
|
@@ -193,12 +193,12 @@ export const organizeJobRequests = sqliteTable(
|
|
|
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: text("literal_clauses", { mode: "json" }).notNull().default([]),
|
|
196
|
-
similarityThreshold: real("similarity_threshold").notNull(),
|
|
196
|
+
similarityThreshold: real("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: integer("ttl", { mode: "number" }).notNull(),
|
|
204
204
|
createdAt: integer("created_at", { mode: "number" }).notNull(),
|
|
@@ -247,6 +247,7 @@ export const threadMessages = sqliteTable(
|
|
|
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 = sqliteTable(
|
|
|
292
293
|
normalizedEmail: text("normalized_email").notNull(),
|
|
293
294
|
normalizedCompound: text("normalized_compound").notNull(),
|
|
294
295
|
flags: text("flags", { mode: "json" }).notNull(),
|
|
295
|
-
inboundCount: integer("inbound_count").notNull(),
|
|
296
|
-
outboundCount: integer("outbound_count").notNull(),
|
|
297
|
-
replyCount: integer("reply_count").notNull(),
|
|
298
|
-
lastInboundAt: integer("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: integer("last_inbound_at", { mode: "number" }).notNull().default(0),
|
|
299
300
|
lastOutboundAt: integer("last_outbound_at", { mode: "number" }),
|
|
300
|
-
lastReplyAt: integer("last_reply_at", { mode: "number" }).notNull(),
|
|
301
|
+
lastReplyAt: integer("last_reply_at", { mode: "number" }).notNull().default(0),
|
|
301
302
|
createdAt: integer("created_at", { mode: "number" }).notNull(),
|
|
302
303
|
updatedAt: integer("updated_at", { mode: "number" }).notNull(),
|
|
303
304
|
},
|