@remit/drizzle-sqlite-schema 0.0.25 → 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.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()),
@@ -115,6 +115,7 @@ export const mailboxes = sqliteTable("mailbox", {
115
115
  updatedAt: integer("updated_at", { mode: "number" }).notNull(),
116
116
  }, (table) => [
117
117
  index("mailbox_by_account_id").on(table.accountId),
118
+ uniqueIndex("mailbox_by_account_full_path").on(table.accountId, table.fullPath),
118
119
  ]);
119
120
  export const filters = sqliteTable("filter", {
120
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.25",
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(
@@ -139,6 +139,7 @@ export const mailboxes = sqliteTable(
139
139
  },
140
140
  (table) => [
141
141
  index("mailbox_by_account_id").on(table.accountId),
142
+ uniqueIndex("mailbox_by_account_full_path").on(table.accountId, table.fullPath),
142
143
  ],
143
144
  );
144
145