Little rework
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
-- CreateEnum
|
||||
CREATE TYPE "ProjectSize" AS ENUM ('Big', 'MediumSized', 'Small');
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "Project" (
|
||||
"id" TEXT NOT NULL,
|
||||
"name" TEXT NOT NULL,
|
||||
"label" TEXT NOT NULL,
|
||||
"size" "ProjectSize" NOT NULL DEFAULT 'MediumSized',
|
||||
"imageUrl" TEXT,
|
||||
"link" TEXT NOT NULL,
|
||||
"linkIsDemo" BOOLEAN NOT NULL DEFAULT false,
|
||||
"sourceCode" TEXT,
|
||||
"description" TEXT NOT NULL,
|
||||
"why" TEXT NOT NULL,
|
||||
"note" TEXT,
|
||||
"tags" TEXT[],
|
||||
"loc" INTEGER,
|
||||
"locEndpoint" TEXT,
|
||||
"featured" BOOLEAN NOT NULL DEFAULT false,
|
||||
"sortIndex" INTEGER NOT NULL DEFAULT 0,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
CONSTRAINT "Project_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "WorkExperience" (
|
||||
"id" TEXT NOT NULL,
|
||||
"company" TEXT NOT NULL,
|
||||
"role" TEXT NOT NULL,
|
||||
"fromDate" TIMESTAMP(3) NOT NULL,
|
||||
"toDate" TIMESTAMP(3),
|
||||
"url" TEXT,
|
||||
"iconUrl" TEXT,
|
||||
"summary" TEXT NOT NULL,
|
||||
"tags" TEXT[],
|
||||
"sortIndex" INTEGER NOT NULL DEFAULT 0,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
CONSTRAINT "WorkExperience_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "Affiliate" (
|
||||
"id" TEXT NOT NULL,
|
||||
"name" TEXT NOT NULL,
|
||||
"link" TEXT NOT NULL,
|
||||
"icon" TEXT NOT NULL,
|
||||
"location" TEXT NOT NULL,
|
||||
"provides" TEXT[],
|
||||
"good" TEXT[],
|
||||
"bad" TEXT[],
|
||||
"sortIndex" INTEGER NOT NULL DEFAULT 0,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
CONSTRAINT "Affiliate_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
@@ -0,0 +1,10 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `featured` on the `Project` table. All the data in the column will be lost.
|
||||
- You are about to drop the column `sortIndex` on the `Project` table. All the data in the column will be lost.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "Project" DROP COLUMN "featured",
|
||||
DROP COLUMN "sortIndex";
|
||||
@@ -0,0 +1,3 @@
|
||||
# Please do not edit this file manually
|
||||
# It should be added in your version-control system (e.g., Git)
|
||||
provider = "postgresql"
|
||||
@@ -0,0 +1,66 @@
|
||||
// Prisma 7 (rust-free `prisma-client` generator + driver adapter).
|
||||
// Client is generated into src/generated/prisma (gitignored) and imported
|
||||
// from "../generated/prisma/client".
|
||||
|
||||
generator client {
|
||||
provider = "prisma-client"
|
||||
output = "../src/generated/prisma"
|
||||
}
|
||||
|
||||
datasource db {
|
||||
provider = "postgresql"
|
||||
}
|
||||
|
||||
enum ProjectSize {
|
||||
Big
|
||||
MediumSized
|
||||
Small
|
||||
}
|
||||
|
||||
model Project {
|
||||
id String @id @default(cuid())
|
||||
name String
|
||||
label String // free-type string, e.g. "Dev Tool", "SaaS"
|
||||
size ProjectSize @default(MediumSized)
|
||||
imageUrl String? // shown fully, nothing overlapping
|
||||
link String
|
||||
linkIsDemo Boolean @default(false)
|
||||
sourceCode String? // github or gitea link
|
||||
description String
|
||||
why String
|
||||
note String? // free note, replaces old {color, content}
|
||||
tags String[] // max 3 enforced in the API
|
||||
loc Int? // manually provided line-of-code count
|
||||
locEndpoint String? // URL the backend hits for a plaintext LoC number
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
model WorkExperience {
|
||||
id String @id @default(cuid())
|
||||
company String
|
||||
role String
|
||||
fromDate DateTime
|
||||
toDate DateTime? // null = Present
|
||||
url String?
|
||||
iconUrl String?
|
||||
summary String
|
||||
tags String[] // max 6 enforced in the API
|
||||
sortIndex Int @default(0)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
model Affiliate {
|
||||
id String @id @default(cuid())
|
||||
name String
|
||||
link String
|
||||
icon String
|
||||
location String
|
||||
provides String[]
|
||||
good String[]
|
||||
bad String[]
|
||||
sortIndex Int @default(0)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
Reference in New Issue
Block a user