This commit is contained in:
Tommy Parnell
2022-04-07 10:01:20 -04:00
commit 6781fd5fdb
21 changed files with 17230 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
-- CreateTable
CREATE TABLE "Note" (
"id" SERIAL NOT NULL,
"name" TEXT NOT NULL,
CONSTRAINT "Note_pkey" PRIMARY KEY ("id")
);

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"

17
prisma/schema.prisma Normal file
View File

@@ -0,0 +1,17 @@
// 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 Note {
id Int @id @default(autoincrement())
name String
}

8
prisma/seed.ts Normal file
View File

@@ -0,0 +1,8 @@
import { PrismaClient } from "@prisma/client";
const db = new PrismaClient();
async function seed() {
return db.note.create({ data: { name: "Note from the databae" }});
}
seed();