upd: user dan log activity
This commit is contained in:
12
prisma/migrations/20260413034305_add/migration.sql
Normal file
12
prisma/migrations/20260413034305_add/migration.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- Changed the type of `type` on the `log` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
|
||||
|
||||
*/
|
||||
-- CreateEnum
|
||||
CREATE TYPE "LogType" AS ENUM ('CREATE', 'UPDATE', 'DELETE', 'LOGIN', 'LOGOUT');
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "log" DROP COLUMN "type",
|
||||
ADD COLUMN "type" "LogType" NOT NULL;
|
||||
2
prisma/migrations/20260413044057_add/migration.sql
Normal file
2
prisma/migrations/20260413044057_add/migration.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "user" ADD COLUMN "image" TEXT;
|
||||
@@ -35,6 +35,14 @@ enum BugStatus{
|
||||
CLOSED
|
||||
}
|
||||
|
||||
enum LogType{
|
||||
CREATE
|
||||
UPDATE
|
||||
DELETE
|
||||
LOGIN
|
||||
LOGOUT
|
||||
}
|
||||
|
||||
model User {
|
||||
id String @id @default(uuid())
|
||||
name String
|
||||
@@ -42,6 +50,7 @@ model User {
|
||||
password String
|
||||
role Role @default(USER)
|
||||
active Boolean @default(true)
|
||||
image String?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
@@ -69,7 +78,7 @@ model Session {
|
||||
model Log {
|
||||
id String @id @default(uuid())
|
||||
userId String
|
||||
type String
|
||||
type LogType
|
||||
message String
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user