@varaos/db 1.1.6 → 1.1.8

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.6",
3
+ "version": "1.1.8",
4
4
  "private": false,
5
5
  "main": "index.js",
6
6
  "files": [
@@ -0,0 +1,4 @@
1
+ -- AlterTable
2
+ ALTER TABLE "public"."EmailSendLog" ADD COLUMN "clickCount" INTEGER NOT NULL DEFAULT 0,
3
+ ADD COLUMN "lastEventAt" TIMESTAMP(3),
4
+ ADD COLUMN "openCount" INTEGER NOT NULL DEFAULT 0;
@@ -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;
@@ -173,6 +173,9 @@ model Integration {
173
173
  metadata Json?
174
174
  deletedAt DateTime?
175
175
 
176
+ catalogId String?
177
+ catalog IntegrationCatalog? @relation(fields: [catalogId], references: [id])
178
+
176
179
  createdAt DateTime @default(now())
177
180
  updatedAt DateTime @updatedAt
178
181
 
@@ -202,8 +205,9 @@ model IntegrationCatalog {
202
205
  setupInstructions Json?
203
206
  status Status @default(draft)
204
207
 
205
- createdAt DateTime @default(now())
206
- updatedAt DateTime @updatedAt
208
+ createdAt DateTime @default(now())
209
+ updatedAt DateTime @updatedAt
210
+ Integration Integration[]
207
211
 
208
212
  @@unique([provider, integration])
209
213
  @@index([status])
@@ -600,14 +604,17 @@ model EmailCampaign {
600
604
  }
601
605
 
602
606
  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())
607
+ id String @id @default(uuid())
608
+ campaignId String
609
+ recipient String
610
+ status String
611
+ messageId String?
612
+ error String?
613
+ metadata Json?
614
+ sentAt DateTime @default(now())
615
+ openCount Int @default(0)
616
+ clickCount Int @default(0)
617
+ lastEventAt DateTime?
611
618
 
612
619
  campaign EmailCampaign @relation(fields: [campaignId], references: [id])
613
620
  }