Skip to content

Commit

Permalink
refactor: readed to isRead and readedAt to isReadAt
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseAlbDR committed Feb 26, 2024
1 parent 798a613 commit 3d72c8e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
12 changes: 12 additions & 0 deletions prisma/migrations/20240226163703_is_read_is_read_at/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
Warnings:
- You are about to drop the column `readed` on the `Notification` table. All the data in the column will be lost.
- You are about to drop the column `readedAt` on the `Notification` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE "Notification" DROP COLUMN "readed",
DROP COLUMN "readedAt",
ADD COLUMN "isRead" BOOLEAN NOT NULL DEFAULT false,
ADD COLUMN "isReaddAt" TIMESTAMP(3);
4 changes: 2 additions & 2 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ model Notification {
id String @id @default(uuid())
userId String
message String
readed Boolean @default(false)
isRead Boolean @default(false)
createdAt DateTime @default(now())
readedAt DateTime?
isReaddAt DateTime?
queue String
User User @relation(fields: [userId], references: [id], onDelete: Cascade)
}
Expand Down

0 comments on commit 3d72c8e

Please sign in to comment.