@remit/drizzle-sqlite-schema 0.0.25 → 0.0.27

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
@@ -890,6 +890,23 @@ export declare const accounts: import("drizzle-orm/sqlite-core").SQLiteTableWith
890
890
  identity: undefined;
891
891
  generated: undefined;
892
892
  }, {}, {}>;
893
+ grantedScopes: import("drizzle-orm/sqlite-core").SQLiteColumn<{
894
+ name: "granted_scopes";
895
+ tableName: "account";
896
+ dataType: "json";
897
+ columnType: "SQLiteTextJson";
898
+ data: unknown;
899
+ driverParam: string;
900
+ notNull: true;
901
+ hasDefault: true;
902
+ isPrimaryKey: false;
903
+ isAutoincrement: false;
904
+ hasRuntimeDefault: false;
905
+ enumValues: undefined;
906
+ baseColumn: never;
907
+ identity: undefined;
908
+ generated: undefined;
909
+ }, {}, {}>;
893
910
  passwordHash: import("drizzle-orm/sqlite-core").SQLiteColumn<{
894
911
  name: "password_hash";
895
912
  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()),
@@ -60,6 +60,7 @@ export const accounts = sqliteTable("account", {
60
60
  email: text("email").notNull(),
61
61
  authType: text("auth_type").$type().notNull().default("password"),
62
62
  syncedServices: text("synced_services", { mode: "json" }).notNull(),
63
+ grantedScopes: text("granted_scopes", { mode: "json" }).notNull().default([]),
63
64
  passwordHash: nullableText("password_hash"),
64
65
  oauthRefreshTokenHash: nullableText("oauth_refresh_token_hash"),
65
66
  oauthTokenUpdatedAt: integer("oauth_token_updated_at", { mode: "number" }),
@@ -115,6 +116,7 @@ export const mailboxes = sqliteTable("mailbox", {
115
116
  updatedAt: integer("updated_at", { mode: "number" }).notNull(),
116
117
  }, (table) => [
117
118
  index("mailbox_by_account_id").on(table.accountId),
119
+ uniqueIndex("mailbox_by_account_full_path").on(table.accountId, table.fullPath),
118
120
  ]);
119
121
  export const filters = sqliteTable("filter", {
120
122
  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.25",
3
+ "version": "0.0.27",
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(
@@ -78,6 +78,7 @@ export const accounts = sqliteTable(
78
78
  email: text("email").notNull(),
79
79
  authType: text("auth_type").$type<"password" | "oauthMicrosoft">().notNull().default("password"),
80
80
  syncedServices: text("synced_services", { mode: "json" }).notNull(),
81
+ grantedScopes: text("granted_scopes", { mode: "json" }).notNull().default([]),
81
82
  passwordHash: nullableText("password_hash"),
82
83
  oauthRefreshTokenHash: nullableText("oauth_refresh_token_hash"),
83
84
  oauthTokenUpdatedAt: integer("oauth_token_updated_at", { mode: "number" }),
@@ -139,6 +140,7 @@ export const mailboxes = sqliteTable(
139
140
  },
140
141
  (table) => [
141
142
  index("mailbox_by_account_id").on(table.accountId),
143
+ uniqueIndex("mailbox_by_account_full_path").on(table.accountId, table.fullPath),
142
144
  ],
143
145
  );
144
146