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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lang-database",
3
- "version": "12.1.0",
3
+ "version": "12.1.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
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? @db.SmallInt
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 @db.SmallInt
51
- newCards Int @db.SmallInt
52
- inProgressCards Int @db.SmallInt
53
- doneCards Int @db.SmallInt
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? @db.SmallInt
76
+ order Int?
77
77
  packs Pack[]
78
78
  @@map("categories")
79
79
  }