Added end to end encryption
This commit is contained in:
parent
5733975aa0
commit
6f292756ed
34 changed files with 682 additions and 69 deletions
|
|
@ -0,0 +1,4 @@
|
|||
-- AlterTable
|
||||
ALTER TABLE "Session" ADD COLUMN "name" TEXT,
|
||||
ADD COLUMN "sessionStorageKey" TEXT,
|
||||
ADD COLUMN "userAgent" TEXT;
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `sessionStorageKey` on the `Session` table. All the data in the column will be lost.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "Session" DROP COLUMN "sessionStorageKey",
|
||||
ADD COLUMN "storageKey" TEXT;
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `storageKey` on the `Session` table. All the data in the column will be lost.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "Session" DROP COLUMN "storageKey",
|
||||
ADD COLUMN "storageSecret" TEXT;
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
-- AlterTable
|
||||
ALTER TABLE "Session" ADD COLUMN "refreshDate" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP;
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
-- AlterTable
|
||||
ALTER TABLE "Message" ADD COLUMN "iv" TEXT;
|
||||
|
|
@ -60,11 +60,15 @@ model User {
|
|||
}
|
||||
|
||||
model Session {
|
||||
id String @id @unique @default(uuid())
|
||||
owner User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
userId String
|
||||
cookie String
|
||||
creationDate DateTime @default(now())
|
||||
id String @id @unique @default(uuid())
|
||||
name String?
|
||||
userAgent String?
|
||||
owner User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
userId String
|
||||
cookie String
|
||||
storageSecret String?
|
||||
creationDate DateTime @default(now())
|
||||
refreshDate DateTime @default(now())
|
||||
}
|
||||
|
||||
model Invite {
|
||||
|
|
@ -82,6 +86,7 @@ model Invite {
|
|||
model Message {
|
||||
id String @id @unique @default(uuid())
|
||||
text String
|
||||
iv String?
|
||||
editHistory String[] @default([])
|
||||
edited Boolean @default(false)
|
||||
owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue