@varaos/db 1.4.0 → 1.4.1
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/package.json
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- The `status` column on the `integrations` table would be dropped and recreated. This will lead to data loss if there is data in the column.
|
|
5
|
+
|
|
6
|
+
*/
|
|
7
|
+
-- CreateEnum
|
|
8
|
+
CREATE TYPE "public"."IntegrationStatus" AS ENUM ('active', 'disconnected', 'suspended', 'failed', 'expired', 'error');
|
|
9
|
+
|
|
10
|
+
-- AlterTable
|
|
11
|
+
ALTER TABLE "public"."integrations" DROP COLUMN "status",
|
|
12
|
+
ADD COLUMN "status" "public"."IntegrationStatus" NOT NULL DEFAULT 'active';
|
|
13
|
+
|
|
14
|
+
-- CreateIndex
|
|
15
|
+
CREATE INDEX "integrations_status_idx" ON "public"."integrations"("status");
|
package/prisma/schema.prisma
CHANGED
|
@@ -46,6 +46,15 @@ enum AuthType {
|
|
|
46
46
|
hybrid
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
enum IntegrationStatus {
|
|
50
|
+
active // Connected and syncing
|
|
51
|
+
disconnected // User disconnected the integration
|
|
52
|
+
suspended // Temporarily disabled
|
|
53
|
+
failed // Sync or auth failed
|
|
54
|
+
expired
|
|
55
|
+
error
|
|
56
|
+
}
|
|
57
|
+
|
|
49
58
|
enum MessageRole {
|
|
50
59
|
user
|
|
51
60
|
assistant
|
|
@@ -532,7 +541,7 @@ model Integration {
|
|
|
532
541
|
expiresAt DateTime?
|
|
533
542
|
scopes Json
|
|
534
543
|
profile Json
|
|
535
|
-
status
|
|
544
|
+
status IntegrationStatus @default(active)
|
|
536
545
|
metadata Json?
|
|
537
546
|
deletedAt DateTime?
|
|
538
547
|
|