From e704f43648b1e49eac00fc63146618f3e8550159 Mon Sep 17 00:00:00 2001 From: ryzetech Date: Fri, 20 Jan 2023 08:58:52 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20added=20friendly=20names=20to=20db?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 2 +- prisma/schema.prisma | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app.js b/app.js index 2e1f031..c7e6bba 100644 --- a/app.js +++ b/app.js @@ -82,7 +82,7 @@ async function loop() { let update = await prisma.space.upsert({ where: { id: space.id }, update: { open: o }, - create: { id: space.id, open: o } + create: { id: space.id, open: o, name: space.name } }); } } diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 48b42af..87fcb7e 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -11,7 +11,9 @@ datasource db { } model Space { - id String @id - open Boolean - updatedAt DateTime @updatedAt -} \ No newline at end of file + id String @id + name String? + open Boolean + lastChange DateTime? + updatedAt DateTime @updatedAt +}