add prisma

This commit is contained in:
Gsk54
2022-12-13 15:27:28 +01:00
parent 225aed4d36
commit a4611b14ce
22 changed files with 835 additions and 8 deletions

View File

@@ -0,0 +1,11 @@
-- CreateTable
CREATE TABLE "user" (
"uuid" UUID NOT NULL,
"firstName" TEXT NOT NULL,
"lastName" TEXT NOT NULL,
"email" TEXT NOT NULL,
"password" TEXT NOT NULL
);
-- CreateIndex
CREATE UNIQUE INDEX "user_uuid_key" ON "user"("uuid");

View File

@@ -0,0 +1,3 @@
# Please do not edit this file manually
# It should be added in your version-control system (i.e. Git)
provider = "postgresql"

21
prisma/schema.prisma Normal file
View File

@@ -0,0 +1,21 @@
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model User {
uuid String @unique @default(uuid()) @db.Uuid
firstName String
lastName String
email String
password String
@@map("user")
}