updated and runned and tested
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
-- CreateTable
|
||||
CREATE TABLE "User" (
|
||||
"id" SERIAL NOT NULL,
|
||||
"name" TEXT NOT NULL,
|
||||
"email" TEXT NOT NULL,
|
||||
|
||||
CONSTRAINT "User_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "User_email_key" ON "User"("email");
|
||||
3
ServicesApi/prisma/migrations/migration_lock.toml
Normal file
3
ServicesApi/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 (e.g., Git)
|
||||
provider = "postgresql"
|
||||
8
ServicesApi/prisma/prisma.module.ts
Normal file
8
ServicesApi/prisma/prisma.module.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { PrismaService } from '@/prisma.service';
|
||||
|
||||
@Module({
|
||||
providers: [PrismaService],
|
||||
exports: [PrismaService], // Dışarı açıyoruz ki başka modüller kullanabilsin
|
||||
})
|
||||
export class PrismaModule {}
|
||||
10
ServicesApi/prisma/schema.prisma
Normal file
10
ServicesApi/prisma/schema.prisma
Normal file
@@ -0,0 +1,10 @@
|
||||
generator client {
|
||||
provider = "prisma-client-js"
|
||||
binaryTargets = ["native", "linux-musl-openssl-3.0.x"]
|
||||
}
|
||||
|
||||
datasource db {
|
||||
provider = "postgresql"
|
||||
url = "postgresql://postgres:password@10.10.2.14:5432/sample_db?schema=public"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user