Skip to content

Commit

Permalink
fix: set hashed password optional (#408)
Browse files Browse the repository at this point in the history
* fix: set hashed password optional

* update migration file
  • Loading branch information
foyarash authored Sep 9, 2024
1 parent 3812930 commit c868ce7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/chilled-baboons-warn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@premieroctet/next-admin": patch
---

fix: set hashed password optional
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
/*
Warnings:
- Added the required column `hashedPassword` to the `User` table without a default value. This is not possible if the table is not empty.
*/
Warnings:
- Added the required column `hashedPassword` to the `User` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "User" ADD COLUMN "hashedPassword" TEXT NOT NULL;
ALTER TABLE
"User"
ADD
COLUMN "hashedPassword" TEXT;
2 changes: 1 addition & 1 deletion apps/example/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ enum Role {
model User {
id Int @id @default(autoincrement())
email String @unique
hashedPassword String
hashedPassword String?
name String?
posts Post[] @relation("author") // One-to-many relation
profile Profile? @relation("profile") // One-to-one relation
Expand Down

0 comments on commit c868ce7

Please sign in to comment.