From c957e63a80ff2da296f5ac38533a5acb607fe089 Mon Sep 17 00:00:00 2001 From: pumbas600 Date: Fri, 29 Mar 2024 12:31:12 +1300 Subject: [PATCH] chore: rename pixels table to pixel --- packages/backend/package.json | 2 +- packages/backend/prisma/schema.prisma | 6 +++--- packages/backend/src/app/index.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/backend/package.json b/packages/backend/package.json index 400ec7d0..f8d1c0ca 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -28,7 +28,7 @@ "build": "tsc", "dev": "nodemon src/index.ts --devmode", "start": "node build/index.js", - "postinstall": "pnpm dlx prisma generate", + "postinstall": "prisma generate", "lint": "biome lint .", "lint:fix": "biome lint --apply .", "format": "biome format .", diff --git a/packages/backend/prisma/schema.prisma b/packages/backend/prisma/schema.prisma index ae5cb62b..8218a4f0 100644 --- a/packages/backend/prisma/schema.prisma +++ b/packages/backend/prisma/schema.prisma @@ -24,7 +24,7 @@ model canvas { cooldown_length Int? start_coordinates Int[] frames frame[] - pixels pixels[] + pixels pixel[] history history[] cooldowns cooldown[] } @@ -37,7 +37,7 @@ model color { global Boolean @default(true) name String rgba Int[] - pixels pixels[] + pixels pixel[] history history[] participant participation? } @@ -122,7 +122,7 @@ model participation { @@id([guild_id, event_id]) } -model pixels { +model pixel { canvas_id Int canvas canvas @relation(fields: [canvas_id], references: [id]) x Int diff --git a/packages/backend/src/app/index.ts b/packages/backend/src/app/index.ts index a013c2b3..88ade0cc 100644 --- a/packages/backend/src/app/index.ts +++ b/packages/backend/src/app/index.ts @@ -20,7 +20,7 @@ export function createApp(): ExpressServer { app.get("/pixels", async (req, res) => { // Example usage :) - const pixels = await prisma.pixels.findMany({ + const pixels = await prisma.pixel.findMany({ // Only select a subset of the table select: { x: true, y: true, color_id: true }, where: {