document-drive 1.29.3-dev.0 → 1.29.4-dev.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "document-drive",
3
- "version": "1.29.3-dev.0",
3
+ "version": "1.29.4-dev.1",
4
4
  "license": "AGPL-3.0-only",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
@@ -41,8 +41,8 @@
41
41
  "sqlite3": "^5.1.7",
42
42
  "uuid": "^11.0.5",
43
43
  "zod": "^3.24.2",
44
- "@powerhousedao/codegen": "0.49.2-dev.0",
45
44
  "@powerhousedao/scalars": "1.33.1-dev.0",
45
+ "@powerhousedao/codegen": "0.49.2-dev.1",
46
46
  "document-model": "2.28.0"
47
47
  },
48
48
  "devDependencies": {
@@ -72,7 +72,7 @@
72
72
  "clean": "rimraf dist",
73
73
  "clean:node_modules": "rimraf node_modules",
74
74
  "migrate": "prisma generate && prisma db push",
75
- "copy-prisma": "copyfiles prisma/schema.prisma dist/",
75
+ "copy-prisma": "copyfiles prisma/schema.copyfiles src/storage/prisma/client/**/* dist/",
76
76
  "prebuild:tsc": "prisma generate --no-hints",
77
77
  "prebuild": "prisma generate --no-hints",
78
78
  "prelint:nx": "prisma generate --no-hints"
@@ -1,90 +0,0 @@
1
- // This is your Prisma schema file,
2
- // learn more about it in the docs: https://pris.ly/d/prisma-schema
3
-
4
- generator client {
5
- provider = "prisma-client-js"
6
- }
7
-
8
- datasource db {
9
- provider = "postgresql"
10
- url = env("DATABASE_URL")
11
- }
12
-
13
- model Drive {
14
- id String @id
15
- slug String @unique
16
- driveDocuments DriveDocument[]
17
- }
18
-
19
- model Document {
20
- id String @id
21
- created DateTime @default(now())
22
- lastModified DateTime @default(now())
23
- isDrive Boolean
24
- revision String
25
- name String?
26
- operations Operation[]
27
- initialState String // json object with the scope as keys of the root object
28
- documentType String
29
- meta String?
30
- synchronizationUnits SynchronizationUnit[]
31
- driveDocuments DriveDocument[]
32
- }
33
-
34
- // Model to map the many-to-many relationship between drives and documents
35
- model DriveDocument {
36
- driveId String
37
- documentId String
38
- drive Drive @relation(fields: [driveId], references: [id], onDelete: Cascade)
39
- document Document @relation(fields: [documentId], references: [id], onDelete: Cascade)
40
-
41
- @@id([driveId, documentId])
42
- @@index([driveId])
43
- @@index([documentId])
44
- }
45
-
46
- model Operation {
47
- id String @id @default(uuid())
48
- opId String?
49
- Document Document? @relation(fields: [documentId], references: [id], onDelete: Cascade)
50
- documentId String
51
- scope String
52
- branch String
53
- index Int
54
- skip Int
55
- hash String
56
- timestamp DateTime
57
- input String
58
- type String
59
- attachments Attachment[]
60
- syncId String?
61
- clipboard Boolean? @default(false)
62
- context Json?
63
- resultingState Bytes?
64
-
65
- SynchronizationUnit SynchronizationUnit? @relation(fields: [syncId], references: [id], onDelete: Cascade)
66
-
67
- @@unique([documentId, scope, branch, index(sort: Asc)], name: "unique_operation")
68
- }
69
-
70
- model SynchronizationUnit {
71
- id String @id
72
- documentId String
73
-
74
- Document Document @relation(fields: [documentId], references: [id], onDelete: Cascade)
75
- scope String
76
- branch String
77
- operations Operation[]
78
- }
79
-
80
- model Attachment {
81
- id String @id @default(uuid())
82
- operationId String
83
- Operation Operation @relation(fields: [operationId], references: [id], onDelete: Cascade)
84
-
85
- mimeType String
86
- data String
87
- filename String?
88
- extension String?
89
- hash String
90
- }