@varaos/db 1.1.13 → 1.1.14
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
package/prisma/migrations/20251121200221_use_visitor_id_as_foreign_key_in_postreaction/migration.sql
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
-- DropForeignKey
|
|
2
|
+
ALTER TABLE "public"."PostReaction" DROP CONSTRAINT "PostReaction_visitorId_fkey";
|
|
3
|
+
|
|
4
|
+
-- DropForeignKey
|
|
5
|
+
ALTER TABLE "public"."PostShare" DROP CONSTRAINT "PostShare_visitorId_fkey";
|
|
6
|
+
|
|
7
|
+
-- AddForeignKey
|
|
8
|
+
ALTER TABLE "public"."PostReaction" ADD CONSTRAINT "PostReaction_visitorId_fkey" FOREIGN KEY ("visitorId") REFERENCES "public"."Visitor"("visitorId") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
9
|
+
|
|
10
|
+
-- AddForeignKey
|
|
11
|
+
ALTER TABLE "public"."PostShare" ADD CONSTRAINT "PostShare_visitorId_fkey" FOREIGN KEY ("visitorId") REFERENCES "public"."Visitor"("visitorId") ON DELETE SET NULL ON UPDATE CASCADE;
|
package/prisma/schema.prisma
CHANGED
|
@@ -753,7 +753,7 @@ model PostReaction {
|
|
|
753
753
|
deletedAt DateTime?
|
|
754
754
|
|
|
755
755
|
post Post @relation(fields: [postId], references: [id], onDelete: Cascade)
|
|
756
|
-
visitor Visitor? @relation(fields: [visitorId], references: [
|
|
756
|
+
visitor Visitor? @relation(fields: [visitorId], references: [visitorId])
|
|
757
757
|
identity CommentIdentity? @relation(fields: [identityId], references: [id])
|
|
758
758
|
|
|
759
759
|
createdAt DateTime @default(now())
|
|
@@ -780,7 +780,7 @@ model PostShare {
|
|
|
780
780
|
metadata Json?
|
|
781
781
|
|
|
782
782
|
post Post @relation(fields: [postId], references: [id], onDelete: Cascade)
|
|
783
|
-
visitor Visitor? @relation(fields: [visitorId], references: [
|
|
783
|
+
visitor Visitor? @relation(fields: [visitorId], references: [visitorId])
|
|
784
784
|
identity CommentIdentity? @relation(fields: [identityId], references: [id])
|
|
785
785
|
|
|
786
786
|
createdAt DateTime @default(now())
|