@varaos/db 1.1.7 → 1.1.9

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varaos/db",
3
- "version": "1.1.7",
3
+ "version": "1.1.9",
4
4
  "private": false,
5
5
  "main": "index.js",
6
6
  "files": [
@@ -0,0 +1,5 @@
1
+ -- AlterTable
2
+ ALTER TABLE "public"."integrations" ADD COLUMN "catalogId" TEXT;
3
+
4
+ -- AddForeignKey
5
+ ALTER TABLE "public"."integrations" ADD CONSTRAINT "integrations_catalogId_fkey" FOREIGN KEY ("catalogId") REFERENCES "public"."integration_catalog"("id") ON DELETE SET NULL ON UPDATE CASCADE;
@@ -0,0 +1,2 @@
1
+ -- AlterEnum
2
+ ALTER TYPE "public"."Status" ADD VALUE 'disconnected';
@@ -29,6 +29,7 @@ enum Status {
29
29
  pending_review // Awaiting manual or automated approval
30
30
  deprecated // Old but still accessible for legacy users
31
31
  archived // Hidden from new users, preserved for history
32
+ disconnected
32
33
  }
33
34
 
34
35
  enum Plan {
@@ -173,6 +174,9 @@ model Integration {
173
174
  metadata Json?
174
175
  deletedAt DateTime?
175
176
 
177
+ catalogId String?
178
+ catalog IntegrationCatalog? @relation(fields: [catalogId], references: [id])
179
+
176
180
  createdAt DateTime @default(now())
177
181
  updatedAt DateTime @updatedAt
178
182
 
@@ -202,8 +206,9 @@ model IntegrationCatalog {
202
206
  setupInstructions Json?
203
207
  status Status @default(draft)
204
208
 
205
- createdAt DateTime @default(now())
206
- updatedAt DateTime @updatedAt
209
+ createdAt DateTime @default(now())
210
+ updatedAt DateTime @updatedAt
211
+ Integration Integration[]
207
212
 
208
213
  @@unique([provider, integration])
209
214
  @@index([status])
@@ -600,16 +605,16 @@ model EmailCampaign {
600
605
  }
601
606
 
602
607
  model EmailSendLog {
603
- id String @id @default(uuid())
604
- campaignId String
605
- recipient String
606
- status String
607
- messageId String?
608
- error String?
609
- metadata Json?
610
- sentAt DateTime @default(now())
611
- openCount Int @default(0)
612
- clickCount Int @default(0)
608
+ id String @id @default(uuid())
609
+ campaignId String
610
+ recipient String
611
+ status String
612
+ messageId String?
613
+ error String?
614
+ metadata Json?
615
+ sentAt DateTime @default(now())
616
+ openCount Int @default(0)
617
+ clickCount Int @default(0)
613
618
  lastEventAt DateTime?
614
619
 
615
620
  campaign EmailCampaign @relation(fields: [campaignId], references: [id])