-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correction of reviews, migration files, and project model name.
- Loading branch information
Showing
4 changed files
with
33 additions
and
35 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
prisma/migrations/20240124155705_user_create/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
-- CreateTable | ||
CREATE TABLE "User" ( | ||
"id" TEXT NOT NULL, | ||
"name" TEXT NOT NULL, | ||
"surname" TEXT NOT NULL, | ||
"email" TEXT NOT NULL, | ||
"password_hash" TEXT NOT NULL, | ||
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updated_at" TIMESTAMP(3) NOT NULL, | ||
|
||
CONSTRAINT "User_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "User_email_key" ON "User"("email"); |
32 changes: 0 additions & 32 deletions
32
prisma/migrations/20240126134916_orange_db_portfolio/migration.sql
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
prisma/migrations/20240126145824_add_project/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
-- CreateTable | ||
CREATE TABLE "Project" ( | ||
"id" TEXT NOT NULL, | ||
"title" TEXT NOT NULL, | ||
"tags" TEXT NOT NULL, | ||
"link" TEXT NOT NULL, | ||
"description" TEXT NOT NULL, | ||
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updated_at" TIMESTAMP(3) NOT NULL, | ||
"user_id" TEXT NOT NULL, | ||
|
||
CONSTRAINT "Project_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "Project" ADD CONSTRAINT "Project_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters