@remit/drizzle-sqlite-schema 0.0.24 → 0.0.26

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 CHANGED
@@ -873,6 +873,23 @@ export declare const accounts: import("drizzle-orm/sqlite-core").SQLiteTableWith
873
873
  length: number;
874
874
  $type: "password" | "oauthMicrosoft";
875
875
  }>;
876
+ syncedServices: import("drizzle-orm/sqlite-core").SQLiteColumn<{
877
+ name: "synced_services";
878
+ tableName: "account";
879
+ dataType: "json";
880
+ columnType: "SQLiteTextJson";
881
+ data: unknown;
882
+ driverParam: string;
883
+ notNull: true;
884
+ hasDefault: false;
885
+ isPrimaryKey: false;
886
+ isAutoincrement: false;
887
+ hasRuntimeDefault: false;
888
+ enumValues: undefined;
889
+ baseColumn: never;
890
+ identity: undefined;
891
+ generated: undefined;
892
+ }, {}, {}>;
876
893
  passwordHash: import("drizzle-orm/sqlite-core").SQLiteColumn<{
877
894
  name: "password_hash";
878
895
  tableName: "account";
package/dist/schema.js CHANGED
@@ -1,4 +1,4 @@
1
- import { index, integer, primaryKey, real, sqliteTable, text } from "drizzle-orm/sqlite-core";
1
+ import { index, integer, primaryKey, real, sqliteTable, text, uniqueIndex } from "drizzle-orm/sqlite-core";
2
2
  import { generateBase36Id, nullableInteger, nullableText } from "./types.js";
3
3
  export const accountExportRequests = sqliteTable("account_export_request", {
4
4
  accountExportRequestId: text("account_export_request_id").primaryKey().$defaultFn(() => generateBase36Id()),
@@ -59,6 +59,7 @@ export const accounts = sqliteTable("account", {
59
59
  username: text("username").notNull(),
60
60
  email: text("email").notNull(),
61
61
  authType: text("auth_type").$type().notNull().default("password"),
62
+ syncedServices: text("synced_services", { mode: "json" }).notNull(),
62
63
  passwordHash: nullableText("password_hash"),
63
64
  oauthRefreshTokenHash: nullableText("oauth_refresh_token_hash"),
64
65
  oauthTokenUpdatedAt: integer("oauth_token_updated_at", { mode: "number" }),
@@ -114,6 +115,7 @@ export const mailboxes = sqliteTable("mailbox", {
114
115
  updatedAt: integer("updated_at", { mode: "number" }).notNull(),
115
116
  }, (table) => [
116
117
  index("mailbox_by_account_id").on(table.accountId),
118
+ uniqueIndex("mailbox_by_account_full_path").on(table.accountId, table.fullPath),
117
119
  ]);
118
120
  export const filters = sqliteTable("filter", {
119
121
  filterId: text("filter_id").primaryKey().$defaultFn(() => generateBase36Id()),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/drizzle-sqlite-schema",
3
- "version": "0.0.24",
3
+ "version": "0.0.26",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/schema.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { index, integer, primaryKey, real, sqliteTable, text } from "drizzle-orm/sqlite-core";
1
+ import { index, integer, primaryKey, real, sqliteTable, text, uniqueIndex } from "drizzle-orm/sqlite-core";
2
2
  import { generateBase36Id, nullableInteger, nullableText } from "./types.js";
3
3
 
4
4
  export const accountExportRequests = sqliteTable(
@@ -77,6 +77,7 @@ export const accounts = sqliteTable(
77
77
  username: text("username").notNull(),
78
78
  email: text("email").notNull(),
79
79
  authType: text("auth_type").$type<"password" | "oauthMicrosoft">().notNull().default("password"),
80
+ syncedServices: text("synced_services", { mode: "json" }).notNull(),
80
81
  passwordHash: nullableText("password_hash"),
81
82
  oauthRefreshTokenHash: nullableText("oauth_refresh_token_hash"),
82
83
  oauthTokenUpdatedAt: integer("oauth_token_updated_at", { mode: "number" }),
@@ -138,6 +139,7 @@ export const mailboxes = sqliteTable(
138
139
  },
139
140
  (table) => [
140
141
  index("mailbox_by_account_id").on(table.accountId),
142
+ uniqueIndex("mailbox_by_account_full_path").on(table.accountId, table.fullPath),
141
143
  ],
142
144
  );
143
145