init
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
CREATE TABLE "Note" (
|
||||
"id" SERIAL NOT NULL,
|
||||
"name" TEXT NOT NULL,
|
||||
"content" TEXT NOT NULL,
|
||||
|
||||
CONSTRAINT "Note_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
);
|
||||
@@ -14,4 +14,5 @@ datasource db {
|
||||
model Note {
|
||||
id Int @id @default(autoincrement())
|
||||
name String
|
||||
content String
|
||||
}
|
||||
@@ -2,7 +2,7 @@ import { PrismaClient } from "@prisma/client";
|
||||
const db = new PrismaClient();
|
||||
|
||||
async function seed() {
|
||||
return db.note.create({ data: { name: "Note from the databae" }});
|
||||
return db.note.create({ data: { name: "Note from the databae", content: " I am a new note :) " }});
|
||||
}
|
||||
|
||||
seed();
|
||||
|
||||
Reference in New Issue
Block a user