mirror of
https://gitlab.com/mobicoop/v3/service/user.git
synced 2025-12-31 02:12:40 +00:00
add prisma
This commit is contained in:
11
prisma/migrations/20221213134247_init/migration.sql
Normal file
11
prisma/migrations/20221213134247_init/migration.sql
Normal 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");
|
||||
3
prisma/migrations/migration_lock.toml
Normal file
3
prisma/migrations/migration_lock.toml
Normal 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
21
prisma/schema.prisma
Normal 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")
|
||||
}
|
||||
Reference in New Issue
Block a user