@optimatech88/titomeet-shared-lib 1.0.31 → 1.0.33
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,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- You are about to drop the column `interests` on the `UserInterests` table. All the data in the column will be lost.
|
|
5
|
+
|
|
6
|
+
*/
|
|
7
|
+
-- AlterTable
|
|
8
|
+
ALTER TABLE "EventCategory" ADD COLUMN "parentId" TEXT;
|
|
9
|
+
|
|
10
|
+
-- AlterTable
|
|
11
|
+
ALTER TABLE "UserInterests" DROP COLUMN "interests";
|
|
12
|
+
|
|
13
|
+
-- CreateTable
|
|
14
|
+
CREATE TABLE "_EventCategoryToUserInterests" (
|
|
15
|
+
"A" TEXT NOT NULL,
|
|
16
|
+
"B" TEXT NOT NULL,
|
|
17
|
+
|
|
18
|
+
CONSTRAINT "_EventCategoryToUserInterests_AB_pkey" PRIMARY KEY ("A","B")
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
-- CreateIndex
|
|
22
|
+
CREATE INDEX "_EventCategoryToUserInterests_B_index" ON "_EventCategoryToUserInterests"("B");
|
|
23
|
+
|
|
24
|
+
-- AddForeignKey
|
|
25
|
+
ALTER TABLE "EventCategory" ADD CONSTRAINT "EventCategory_parentId_fkey" FOREIGN KEY ("parentId") REFERENCES "EventCategory"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
26
|
+
|
|
27
|
+
-- AddForeignKey
|
|
28
|
+
ALTER TABLE "_EventCategoryToUserInterests" ADD CONSTRAINT "_EventCategoryToUserInterests_A_fkey" FOREIGN KEY ("A") REFERENCES "EventCategory"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
29
|
+
|
|
30
|
+
-- AddForeignKey
|
|
31
|
+
ALTER TABLE "_EventCategoryToUserInterests" ADD CONSTRAINT "_EventCategoryToUserInterests_B_fkey" FOREIGN KEY ("B") REFERENCES "UserInterests"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- You are about to drop the column `mediaType` on the `Message` table. All the data in the column will be lost.
|
|
5
|
+
- You are about to drop the column `mediaUrl` on the `Message` table. All the data in the column will be lost.
|
|
6
|
+
|
|
7
|
+
*/
|
|
8
|
+
-- AlterTable
|
|
9
|
+
ALTER TABLE "Message" DROP COLUMN "mediaType",
|
|
10
|
+
DROP COLUMN "mediaUrl",
|
|
11
|
+
ADD COLUMN "files" JSONB;
|
package/prisma/schema.prisma
CHANGED
|
@@ -68,6 +68,13 @@ model EventCategory {
|
|
|
68
68
|
updatedAt DateTime @updatedAt
|
|
69
69
|
active Boolean @default(true)
|
|
70
70
|
events Event[] @relation("EventToEventCategory")
|
|
71
|
+
userInterests UserInterests[]
|
|
72
|
+
|
|
73
|
+
parentId String?
|
|
74
|
+
parent EventCategory? @relation("EventCategoryParent", fields: [parentId], references: [id])
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
children EventCategory[] @relation("EventCategoryParent")
|
|
71
78
|
}
|
|
72
79
|
|
|
73
80
|
model Event {
|
|
@@ -138,9 +145,8 @@ model Message {
|
|
|
138
145
|
senderId String
|
|
139
146
|
createdAt DateTime @default(now())
|
|
140
147
|
updatedAt DateTime @updatedAt
|
|
141
|
-
|
|
148
|
+
files Json?
|
|
142
149
|
text String
|
|
143
|
-
mediaType MediaType?
|
|
144
150
|
chat Chat @relation(fields: [chatId], references: [id])
|
|
145
151
|
sender User @relation(fields: [senderId], references: [id])
|
|
146
152
|
}
|
|
@@ -246,7 +252,8 @@ model OrderItem {
|
|
|
246
252
|
model UserInterests {
|
|
247
253
|
id String @id @default(cuid())
|
|
248
254
|
|
|
249
|
-
interests
|
|
255
|
+
interests EventCategory[]
|
|
256
|
+
|
|
250
257
|
userId String @unique
|
|
251
258
|
user User @relation(fields: [userId], references: [id])
|
|
252
259
|
|