@remit/drizzle-pg-schema 0.0.36 → 0.0.38
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 +0 -251
- package/dist/schema.js +1 -18
- package/package.json +1 -1
- package/schema.ts +1 -23
package/dist/schema.d.ts
CHANGED
|
@@ -7970,257 +7970,6 @@ export declare const rawMessageStorages: import("drizzle-orm/pg-core").PgTableWi
|
|
|
7970
7970
|
};
|
|
7971
7971
|
dialect: "pg";
|
|
7972
7972
|
}>;
|
|
7973
|
-
export declare const bodyPartStorages: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
7974
|
-
name: "body_part_storage";
|
|
7975
|
-
schema: undefined;
|
|
7976
|
-
columns: {
|
|
7977
|
-
bodyPartStorageId: import("drizzle-orm/pg-core").PgColumn<{
|
|
7978
|
-
name: "body_part_storage_id";
|
|
7979
|
-
tableName: "body_part_storage";
|
|
7980
|
-
dataType: "string";
|
|
7981
|
-
columnType: "PgText";
|
|
7982
|
-
data: string;
|
|
7983
|
-
driverParam: string;
|
|
7984
|
-
notNull: true;
|
|
7985
|
-
hasDefault: true;
|
|
7986
|
-
isPrimaryKey: true;
|
|
7987
|
-
isAutoincrement: false;
|
|
7988
|
-
hasRuntimeDefault: true;
|
|
7989
|
-
enumValues: [string, ...string[]];
|
|
7990
|
-
baseColumn: never;
|
|
7991
|
-
identity: undefined;
|
|
7992
|
-
generated: undefined;
|
|
7993
|
-
}, {}, {}>;
|
|
7994
|
-
messageId: import("drizzle-orm/pg-core").PgColumn<{
|
|
7995
|
-
name: "message_id";
|
|
7996
|
-
tableName: "body_part_storage";
|
|
7997
|
-
dataType: "string";
|
|
7998
|
-
columnType: "PgText";
|
|
7999
|
-
data: string;
|
|
8000
|
-
driverParam: string;
|
|
8001
|
-
notNull: true;
|
|
8002
|
-
hasDefault: false;
|
|
8003
|
-
isPrimaryKey: false;
|
|
8004
|
-
isAutoincrement: false;
|
|
8005
|
-
hasRuntimeDefault: false;
|
|
8006
|
-
enumValues: [string, ...string[]];
|
|
8007
|
-
baseColumn: never;
|
|
8008
|
-
identity: undefined;
|
|
8009
|
-
generated: undefined;
|
|
8010
|
-
}, {}, {}>;
|
|
8011
|
-
bodyPartId: import("drizzle-orm/pg-core").PgColumn<{
|
|
8012
|
-
name: "body_part_id";
|
|
8013
|
-
tableName: "body_part_storage";
|
|
8014
|
-
dataType: "string";
|
|
8015
|
-
columnType: "PgText";
|
|
8016
|
-
data: string;
|
|
8017
|
-
driverParam: string;
|
|
8018
|
-
notNull: true;
|
|
8019
|
-
hasDefault: false;
|
|
8020
|
-
isPrimaryKey: false;
|
|
8021
|
-
isAutoincrement: false;
|
|
8022
|
-
hasRuntimeDefault: false;
|
|
8023
|
-
enumValues: [string, ...string[]];
|
|
8024
|
-
baseColumn: never;
|
|
8025
|
-
identity: undefined;
|
|
8026
|
-
generated: undefined;
|
|
8027
|
-
}, {}, {}>;
|
|
8028
|
-
storageType: import("drizzle-orm/pg-core").PgColumn<{
|
|
8029
|
-
name: "storage_type";
|
|
8030
|
-
tableName: "body_part_storage";
|
|
8031
|
-
dataType: "string";
|
|
8032
|
-
columnType: "PgText";
|
|
8033
|
-
data: "inline" | "s3" | "filesystem" | "database";
|
|
8034
|
-
driverParam: string;
|
|
8035
|
-
notNull: true;
|
|
8036
|
-
hasDefault: false;
|
|
8037
|
-
isPrimaryKey: false;
|
|
8038
|
-
isAutoincrement: false;
|
|
8039
|
-
hasRuntimeDefault: false;
|
|
8040
|
-
enumValues: [string, ...string[]];
|
|
8041
|
-
baseColumn: never;
|
|
8042
|
-
identity: undefined;
|
|
8043
|
-
generated: undefined;
|
|
8044
|
-
}, {}, {
|
|
8045
|
-
$type: "inline" | "s3" | "filesystem" | "database";
|
|
8046
|
-
}>;
|
|
8047
|
-
storageLocation: import("drizzle-orm/pg-core").PgColumn<{
|
|
8048
|
-
name: "storage_location";
|
|
8049
|
-
tableName: "body_part_storage";
|
|
8050
|
-
dataType: "string";
|
|
8051
|
-
columnType: "PgText";
|
|
8052
|
-
data: string;
|
|
8053
|
-
driverParam: string;
|
|
8054
|
-
notNull: true;
|
|
8055
|
-
hasDefault: false;
|
|
8056
|
-
isPrimaryKey: false;
|
|
8057
|
-
isAutoincrement: false;
|
|
8058
|
-
hasRuntimeDefault: false;
|
|
8059
|
-
enumValues: [string, ...string[]];
|
|
8060
|
-
baseColumn: never;
|
|
8061
|
-
identity: undefined;
|
|
8062
|
-
generated: undefined;
|
|
8063
|
-
}, {}, {}>;
|
|
8064
|
-
storageKey: import("drizzle-orm/pg-core").PgColumn<{
|
|
8065
|
-
name: "storage_key";
|
|
8066
|
-
tableName: "body_part_storage";
|
|
8067
|
-
dataType: "string";
|
|
8068
|
-
columnType: "PgText";
|
|
8069
|
-
data: string;
|
|
8070
|
-
driverParam: string;
|
|
8071
|
-
notNull: true;
|
|
8072
|
-
hasDefault: false;
|
|
8073
|
-
isPrimaryKey: false;
|
|
8074
|
-
isAutoincrement: false;
|
|
8075
|
-
hasRuntimeDefault: false;
|
|
8076
|
-
enumValues: [string, ...string[]];
|
|
8077
|
-
baseColumn: never;
|
|
8078
|
-
identity: undefined;
|
|
8079
|
-
generated: undefined;
|
|
8080
|
-
}, {}, {}>;
|
|
8081
|
-
decodedSizeBytes: import("drizzle-orm/pg-core").PgColumn<{
|
|
8082
|
-
name: "decoded_size_bytes";
|
|
8083
|
-
tableName: "body_part_storage";
|
|
8084
|
-
dataType: "number";
|
|
8085
|
-
columnType: "PgBigInt53";
|
|
8086
|
-
data: number;
|
|
8087
|
-
driverParam: string | number;
|
|
8088
|
-
notNull: true;
|
|
8089
|
-
hasDefault: false;
|
|
8090
|
-
isPrimaryKey: false;
|
|
8091
|
-
isAutoincrement: false;
|
|
8092
|
-
hasRuntimeDefault: false;
|
|
8093
|
-
enumValues: undefined;
|
|
8094
|
-
baseColumn: never;
|
|
8095
|
-
identity: undefined;
|
|
8096
|
-
generated: undefined;
|
|
8097
|
-
}, {}, {}>;
|
|
8098
|
-
checksumSha256: import("drizzle-orm/pg-core").PgColumn<{
|
|
8099
|
-
name: "checksum_sha256";
|
|
8100
|
-
tableName: "body_part_storage";
|
|
8101
|
-
dataType: "string";
|
|
8102
|
-
columnType: "PgText";
|
|
8103
|
-
data: string;
|
|
8104
|
-
driverParam: string;
|
|
8105
|
-
notNull: true;
|
|
8106
|
-
hasDefault: false;
|
|
8107
|
-
isPrimaryKey: false;
|
|
8108
|
-
isAutoincrement: false;
|
|
8109
|
-
hasRuntimeDefault: false;
|
|
8110
|
-
enumValues: [string, ...string[]];
|
|
8111
|
-
baseColumn: never;
|
|
8112
|
-
identity: undefined;
|
|
8113
|
-
generated: undefined;
|
|
8114
|
-
}, {}, {}>;
|
|
8115
|
-
contentEncoding: import("drizzle-orm/pg-core").PgColumn<{
|
|
8116
|
-
name: "content_encoding";
|
|
8117
|
-
tableName: "body_part_storage";
|
|
8118
|
-
dataType: "string";
|
|
8119
|
-
columnType: "PgText";
|
|
8120
|
-
data: "none" | "gzip" | "zstd";
|
|
8121
|
-
driverParam: string;
|
|
8122
|
-
notNull: true;
|
|
8123
|
-
hasDefault: false;
|
|
8124
|
-
isPrimaryKey: false;
|
|
8125
|
-
isAutoincrement: false;
|
|
8126
|
-
hasRuntimeDefault: false;
|
|
8127
|
-
enumValues: [string, ...string[]];
|
|
8128
|
-
baseColumn: never;
|
|
8129
|
-
identity: undefined;
|
|
8130
|
-
generated: undefined;
|
|
8131
|
-
}, {}, {
|
|
8132
|
-
$type: "none" | "gzip" | "zstd";
|
|
8133
|
-
}>;
|
|
8134
|
-
isDeduped: import("drizzle-orm/pg-core").PgColumn<{
|
|
8135
|
-
name: "is_deduped";
|
|
8136
|
-
tableName: "body_part_storage";
|
|
8137
|
-
dataType: "boolean";
|
|
8138
|
-
columnType: "PgBoolean";
|
|
8139
|
-
data: boolean;
|
|
8140
|
-
driverParam: boolean;
|
|
8141
|
-
notNull: true;
|
|
8142
|
-
hasDefault: false;
|
|
8143
|
-
isPrimaryKey: false;
|
|
8144
|
-
isAutoincrement: false;
|
|
8145
|
-
hasRuntimeDefault: false;
|
|
8146
|
-
enumValues: undefined;
|
|
8147
|
-
baseColumn: never;
|
|
8148
|
-
identity: undefined;
|
|
8149
|
-
generated: undefined;
|
|
8150
|
-
}, {}, {}>;
|
|
8151
|
-
dedupHash: import("drizzle-orm/pg-core").PgColumn<{
|
|
8152
|
-
name: "dedup_hash";
|
|
8153
|
-
tableName: "body_part_storage";
|
|
8154
|
-
dataType: "custom";
|
|
8155
|
-
columnType: "PgCustomColumn";
|
|
8156
|
-
data: string;
|
|
8157
|
-
driverParam: string;
|
|
8158
|
-
notNull: false;
|
|
8159
|
-
hasDefault: false;
|
|
8160
|
-
isPrimaryKey: false;
|
|
8161
|
-
isAutoincrement: false;
|
|
8162
|
-
hasRuntimeDefault: false;
|
|
8163
|
-
enumValues: undefined;
|
|
8164
|
-
baseColumn: never;
|
|
8165
|
-
identity: undefined;
|
|
8166
|
-
generated: undefined;
|
|
8167
|
-
}, {}, {
|
|
8168
|
-
pgColumnBuilderBrand: "PgCustomColumnBuilderBrand";
|
|
8169
|
-
}>;
|
|
8170
|
-
storedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
8171
|
-
name: "stored_at";
|
|
8172
|
-
tableName: "body_part_storage";
|
|
8173
|
-
dataType: "number";
|
|
8174
|
-
columnType: "PgBigInt53";
|
|
8175
|
-
data: number;
|
|
8176
|
-
driverParam: string | number;
|
|
8177
|
-
notNull: true;
|
|
8178
|
-
hasDefault: false;
|
|
8179
|
-
isPrimaryKey: false;
|
|
8180
|
-
isAutoincrement: false;
|
|
8181
|
-
hasRuntimeDefault: false;
|
|
8182
|
-
enumValues: undefined;
|
|
8183
|
-
baseColumn: never;
|
|
8184
|
-
identity: undefined;
|
|
8185
|
-
generated: undefined;
|
|
8186
|
-
}, {}, {}>;
|
|
8187
|
-
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
8188
|
-
name: "created_at";
|
|
8189
|
-
tableName: "body_part_storage";
|
|
8190
|
-
dataType: "number";
|
|
8191
|
-
columnType: "PgBigInt53";
|
|
8192
|
-
data: number;
|
|
8193
|
-
driverParam: string | number;
|
|
8194
|
-
notNull: true;
|
|
8195
|
-
hasDefault: false;
|
|
8196
|
-
isPrimaryKey: false;
|
|
8197
|
-
isAutoincrement: false;
|
|
8198
|
-
hasRuntimeDefault: false;
|
|
8199
|
-
enumValues: undefined;
|
|
8200
|
-
baseColumn: never;
|
|
8201
|
-
identity: undefined;
|
|
8202
|
-
generated: undefined;
|
|
8203
|
-
}, {}, {}>;
|
|
8204
|
-
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
8205
|
-
name: "updated_at";
|
|
8206
|
-
tableName: "body_part_storage";
|
|
8207
|
-
dataType: "number";
|
|
8208
|
-
columnType: "PgBigInt53";
|
|
8209
|
-
data: number;
|
|
8210
|
-
driverParam: string | number;
|
|
8211
|
-
notNull: true;
|
|
8212
|
-
hasDefault: false;
|
|
8213
|
-
isPrimaryKey: false;
|
|
8214
|
-
isAutoincrement: false;
|
|
8215
|
-
hasRuntimeDefault: false;
|
|
8216
|
-
enumValues: undefined;
|
|
8217
|
-
baseColumn: never;
|
|
8218
|
-
identity: undefined;
|
|
8219
|
-
generated: undefined;
|
|
8220
|
-
}, {}, {}>;
|
|
8221
|
-
};
|
|
8222
|
-
dialect: "pg";
|
|
8223
|
-
}>;
|
|
8224
7973
|
export declare const calendarEventIndexes: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
8225
7974
|
name: "calendar_event_index";
|
|
8226
7975
|
schema: undefined;
|
package/dist/schema.js
CHANGED
|
@@ -364,6 +364,7 @@ export const messageRecords = pgTable("message", {
|
|
|
364
364
|
updatedAt: bigint("updated_at", { mode: "number" }).notNull(),
|
|
365
365
|
}, (table) => [
|
|
366
366
|
index("message_by_mailbox_id").on(table.mailboxId, table.uid),
|
|
367
|
+
index("message_by_body_storage_key").on(table.bodyStorageKey),
|
|
367
368
|
]);
|
|
368
369
|
export const bodyParts = pgTable("body_part", {
|
|
369
370
|
bodyPartId: text("body_part_id").primaryKey().$defaultFn(() => generateBase36Id()),
|
|
@@ -601,24 +602,6 @@ export const rawMessageStorages = pgTable("raw_message_storage", {
|
|
|
601
602
|
}, (table) => [
|
|
602
603
|
index("raw_message_storage_by_message_id").on(table.messageId, table.rawStorageId),
|
|
603
604
|
]);
|
|
604
|
-
export const bodyPartStorages = pgTable("body_part_storage", {
|
|
605
|
-
bodyPartStorageId: text("body_part_storage_id").primaryKey().$defaultFn(() => generateBase36Id()),
|
|
606
|
-
messageId: text("message_id").notNull(),
|
|
607
|
-
bodyPartId: text("body_part_id").notNull(),
|
|
608
|
-
storageType: text("storage_type").$type().notNull(),
|
|
609
|
-
storageLocation: text("storage_location").notNull(),
|
|
610
|
-
storageKey: text("storage_key").notNull(),
|
|
611
|
-
decodedSizeBytes: bigint("decoded_size_bytes", { mode: "number" }).notNull(),
|
|
612
|
-
checksumSha256: text("checksum_sha256").notNull(),
|
|
613
|
-
contentEncoding: text("content_encoding").$type().notNull(),
|
|
614
|
-
isDeduped: boolean("is_deduped").notNull(),
|
|
615
|
-
dedupHash: nullableText("dedup_hash"),
|
|
616
|
-
storedAt: bigint("stored_at", { mode: "number" }).notNull(),
|
|
617
|
-
createdAt: bigint("created_at", { mode: "number" }).notNull(),
|
|
618
|
-
updatedAt: bigint("updated_at", { mode: "number" }).notNull(),
|
|
619
|
-
}, (table) => [
|
|
620
|
-
index("body_part_storage_by_message_id").on(table.messageId, table.bodyPartStorageId),
|
|
621
|
-
]);
|
|
622
605
|
export const calendarEventIndexes = pgTable("calendar_event_index", {
|
|
623
606
|
calendarId: text("calendar_id").notNull(),
|
|
624
607
|
calendarObjectId: text("calendar_object_id").notNull(),
|
package/package.json
CHANGED
package/schema.ts
CHANGED
|
@@ -443,6 +443,7 @@ export const messageRecords = pgTable(
|
|
|
443
443
|
},
|
|
444
444
|
(table) => [
|
|
445
445
|
index("message_by_mailbox_id").on(table.mailboxId, table.uid),
|
|
446
|
+
index("message_by_body_storage_key").on(table.bodyStorageKey),
|
|
446
447
|
],
|
|
447
448
|
);
|
|
448
449
|
|
|
@@ -769,29 +770,6 @@ export const rawMessageStorages = pgTable(
|
|
|
769
770
|
],
|
|
770
771
|
);
|
|
771
772
|
|
|
772
|
-
export const bodyPartStorages = pgTable(
|
|
773
|
-
"body_part_storage",
|
|
774
|
-
{
|
|
775
|
-
bodyPartStorageId: text("body_part_storage_id").primaryKey().$defaultFn(() => generateBase36Id()),
|
|
776
|
-
messageId: text("message_id").notNull(),
|
|
777
|
-
bodyPartId: text("body_part_id").notNull(),
|
|
778
|
-
storageType: text("storage_type").$type<"s3" | "filesystem" | "inline" | "database">().notNull(),
|
|
779
|
-
storageLocation: text("storage_location").notNull(),
|
|
780
|
-
storageKey: text("storage_key").notNull(),
|
|
781
|
-
decodedSizeBytes: bigint("decoded_size_bytes", { mode: "number" }).notNull(),
|
|
782
|
-
checksumSha256: text("checksum_sha256").notNull(),
|
|
783
|
-
contentEncoding: text("content_encoding").$type<"none" | "gzip" | "zstd">().notNull(),
|
|
784
|
-
isDeduped: boolean("is_deduped").notNull(),
|
|
785
|
-
dedupHash: nullableText("dedup_hash"),
|
|
786
|
-
storedAt: bigint("stored_at", { mode: "number" }).notNull(),
|
|
787
|
-
createdAt: bigint("created_at", { mode: "number" }).notNull(),
|
|
788
|
-
updatedAt: bigint("updated_at", { mode: "number" }).notNull(),
|
|
789
|
-
},
|
|
790
|
-
(table) => [
|
|
791
|
-
index("body_part_storage_by_message_id").on(table.messageId, table.bodyPartStorageId),
|
|
792
|
-
],
|
|
793
|
-
);
|
|
794
|
-
|
|
795
773
|
export const calendarEventIndexes = pgTable(
|
|
796
774
|
"calendar_event_index",
|
|
797
775
|
{
|