Update to RW 8.3.0 + Project CRUD complete

This commit is contained in:
Ahmed Al-Taiar
2024-09-27 22:52:41 -04:00
parent 430a2da835
commit 5c41588249
21 changed files with 1395 additions and 1170 deletions

View File

@ -0,0 +1,14 @@
/*
Warnings:
- You are about to drop the `ProjectImage` table. If the table is not empty, all the data it contains will be lost.
*/
-- DropForeignKey
ALTER TABLE "ProjectImage" DROP CONSTRAINT "ProjectImage_projectId_fkey";
-- AlterTable
ALTER TABLE "Project" ADD COLUMN "images" TEXT[];
-- DropTable
DROP TABLE "ProjectImage";

View File

@ -65,20 +65,12 @@ model Tag {
projects Project[]
}
model ProjectImage {
id Int @id @default(autoincrement())
fileId String
Project Project? @relation(fields: [projectId], references: [id])
projectId Int?
}
model Project {
id Int @id @default(autoincrement())
id Int @id @default(autoincrement())
title String
description String @default("No description provided")
images ProjectImage[]
description String @default("No description provided")
images String[]
date DateTime
links String[] @default([])
links String[] @default([])
tags Tag[]
}