From 36475983544fe9298fb81e6fad77499e0761b0e3 Mon Sep 17 00:00:00 2001 From: dorakueYaritai Date: Thu, 9 Nov 2023 14:27:17 +0900 Subject: [PATCH] add new model room yarn prisma migrate dev -name room --- .../prisma/migrations/20231109052515_room/migration.sql | 7 +++++++ backend/prisma/schema.prisma | 5 +++++ 2 files changed, 12 insertions(+) create mode 100644 backend/prisma/migrations/20231109052515_room/migration.sql diff --git a/backend/prisma/migrations/20231109052515_room/migration.sql b/backend/prisma/migrations/20231109052515_room/migration.sql new file mode 100644 index 00000000..1fb69f84 --- /dev/null +++ b/backend/prisma/migrations/20231109052515_room/migration.sql @@ -0,0 +1,7 @@ +-- CreateTable +CREATE TABLE "Room" ( + "id" SERIAL NOT NULL, + "name" TEXT NOT NULL, + + CONSTRAINT "Room_pkey" PRIMARY KEY ("id") +); diff --git a/backend/prisma/schema.prisma b/backend/prisma/schema.prisma index 2016f4c3..05562a92 100644 --- a/backend/prisma/schema.prisma +++ b/backend/prisma/schema.prisma @@ -16,3 +16,8 @@ model User { name String? password String } + +model Room { + id Int @id @default(autoincrement()) + name String +} \ No newline at end of file