lang-database 12.1.0 → 12.1.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.
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- You are about to drop the `_PackToUser` table. If the table is not empty, all the data it contains will be lost.
|
|
5
|
+
|
|
6
|
+
*/
|
|
7
|
+
-- DropForeignKey
|
|
8
|
+
ALTER TABLE "_PackToUser" DROP CONSTRAINT "_PackToUser_A_fkey";
|
|
9
|
+
|
|
10
|
+
-- DropForeignKey
|
|
11
|
+
ALTER TABLE "_PackToUser" DROP CONSTRAINT "_PackToUser_B_fkey";
|
|
12
|
+
|
|
13
|
+
-- DropTable
|
|
14
|
+
DROP TABLE "_PackToUser";
|
|
15
|
+
|
|
16
|
+
-- CreateTable
|
|
17
|
+
CREATE TABLE "userDecks" (
|
|
18
|
+
"userId" TEXT NOT NULL,
|
|
19
|
+
"deckId" TEXT NOT NULL,
|
|
20
|
+
"reverse" BOOLEAN NOT NULL,
|
|
21
|
+
"allCards" INTEGER NOT NULL,
|
|
22
|
+
"newCards" INTEGER NOT NULL,
|
|
23
|
+
"inProgressCards" INTEGER NOT NULL,
|
|
24
|
+
"doneCards" INTEGER NOT NULL,
|
|
25
|
+
|
|
26
|
+
CONSTRAINT "userDecks_pkey" PRIMARY KEY ("userId","deckId","reverse")
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
-- AddForeignKey
|
|
30
|
+
ALTER TABLE "userDecks" ADD CONSTRAINT "userDecks_userId_fkey" FOREIGN KEY ("userId") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
31
|
+
|
|
32
|
+
-- AddForeignKey
|
|
33
|
+
ALTER TABLE "userDecks" ADD CONSTRAINT "userDecks_deckId_fkey" FOREIGN KEY ("deckId") REFERENCES "packs"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
package/package.json
CHANGED
package/schema.prisma
CHANGED
|
@@ -33,7 +33,7 @@ model UserCard {
|
|
|
33
33
|
reverse Boolean
|
|
34
34
|
|
|
35
35
|
done Boolean @default(false)
|
|
36
|
-
currentInterval Int?
|
|
36
|
+
currentInterval Int?
|
|
37
37
|
dueDate DateTime?
|
|
38
38
|
|
|
39
39
|
@@id([userId, cardId, reverse])
|
|
@@ -47,10 +47,10 @@ model UserDeck {
|
|
|
47
47
|
deckId String
|
|
48
48
|
reverse Boolean
|
|
49
49
|
|
|
50
|
-
allCards Int
|
|
51
|
-
newCards Int
|
|
52
|
-
inProgressCards Int
|
|
53
|
-
doneCards Int
|
|
50
|
+
allCards Int
|
|
51
|
+
newCards Int
|
|
52
|
+
inProgressCards Int
|
|
53
|
+
doneCards Int
|
|
54
54
|
|
|
55
55
|
@@id([userId, deckId, reverse])
|
|
56
56
|
@@map("userDecks")
|
|
@@ -73,7 +73,7 @@ model UserStat {
|
|
|
73
73
|
model Category {
|
|
74
74
|
id String @id @default(cuid())
|
|
75
75
|
name String
|
|
76
|
-
order Int?
|
|
76
|
+
order Int?
|
|
77
77
|
packs Pack[]
|
|
78
78
|
@@map("categories")
|
|
79
79
|
}
|