Rework authentication
This commit is contained in:
parent
a85330e8cf
commit
c07d33bcc9
17 changed files with 317 additions and 128 deletions
|
|
@ -0,0 +1,10 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `token` on the `Session` table. All the data in the column will be lost.
|
||||
- Added the required column `cookie` to the `Session` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "Session" DROP COLUMN "token",
|
||||
ADD COLUMN "cookie" TEXT NOT NULL;
|
||||
|
|
@ -59,7 +59,7 @@ model Session {
|
|||
id String @id @unique @default(uuid())
|
||||
owner User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
userId String
|
||||
token String
|
||||
cookie String
|
||||
creationDate DateTime @default(now())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue