Skip to content

Commit

Permalink
feat: bump document drive
Browse files Browse the repository at this point in the history
  • Loading branch information
froid1911 committed Feb 20, 2024
1 parent 5d5c5a8 commit 8103716
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 17 deletions.
2 changes: 1 addition & 1 deletion api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"body-parser": "^1.20.2",
"cookie-parser": "^1.4.6",
"cors": "^2.8.5",
"document-drive": "^1.0.0-alpha.3",
"document-drive": "^1.0.0-alpha.5",
"document-model": "^1.0.30",
"document-model-libs": "^1.1.51",
"dotenv": "^16.0.3",
Expand Down
8 changes: 4 additions & 4 deletions api/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 7 additions & 12 deletions api/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ model Document {
}

model Operation {
id String @id @default(uuid())
driveId String
Document Document? @relation(fields: [driveId, documentId], references: [driveId, id])
Document Document? @relation(fields: [driveId, documentId], references: [driveId, id], onDelete: Cascade)
documentId String
scope String
branch String
Expand All @@ -80,17 +81,15 @@ model Operation {
syncId String?
clipboard Boolean? @default(false)
SyncronizationUnit SyncronizationUnit? @relation(fields: [syncId, driveId], references: [id, driveId])
@@id([driveId, documentId, scope, branch, index])
SyncronizationUnit SyncronizationUnit? @relation(fields: [syncId, driveId], references: [id, driveId], onDelete: Cascade)
}

model SyncronizationUnit {
id String
driveId String
documentId String
Document Document @relation(fields: [documentId, driveId], references: [id, driveId])
Document Document @relation(fields: [documentId, driveId], references: [id, driveId], onDelete: Cascade)
scope String
branch String
operations Operation[]
Expand All @@ -99,13 +98,9 @@ model SyncronizationUnit {
}

model Attachment {
id String @id @default(uuid())
driveId String
documentId String
scope String
branch String
index Int
Operation Operation @relation(fields: [driveId, documentId, scope, branch, index], references: [driveId, documentId, scope, branch, index], onDelete: Cascade)
id String @id @default(uuid())
operationId String
Operation Operation @relation(fields: [operationId], references: [id], onDelete: Cascade)
mimeType String
data String
Expand Down

0 comments on commit 8103716

Please sign in to comment.