From 4abfcffee09935c017eaf3dc0f5bb7839dddc178 Mon Sep 17 00:00:00 2001 From: Aaron Scherer Date: Wed, 17 May 2023 16:48:52 +0000 Subject: [PATCH] Unique index names --- packages/discord/src/Entity/Printer.ts | 6 +++--- packages/discord/src/Entity/Queue.ts | 2 +- packages/discord/src/Entity/QueueItem.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/discord/src/Entity/Printer.ts b/packages/discord/src/Entity/Printer.ts index eae3aeb..aa8d699 100644 --- a/packages/discord/src/Entity/Printer.ts +++ b/packages/discord/src/Entity/Printer.ts @@ -16,9 +16,9 @@ import { Subscription } from './Subscription'; import { Owner } from './Owner'; @Entity() -@Unique('name', ['name']) -@Unique('host-and-port', ['host', 'port']) -@Unique('serialNumber', ['serialNumber']) +@Unique('printer-name', ['name']) +@Unique('printer-host-and-port', ['host', 'port']) +@Unique('printer-serialNumber', ['serialNumber']) export class Printer { @PrimaryGeneratedColumn('increment') public id: number; diff --git a/packages/discord/src/Entity/Queue.ts b/packages/discord/src/Entity/Queue.ts index 820c77a..2d8c82d 100644 --- a/packages/discord/src/Entity/Queue.ts +++ b/packages/discord/src/Entity/Queue.ts @@ -13,7 +13,7 @@ import { Owner } from './Owner'; import { QueueItem } from './QueueItem'; @Entity() -@Unique('name', ['name']) +@Unique('queue-name', ['name']) export class Queue { @PrimaryGeneratedColumn('increment') public id: number; diff --git a/packages/discord/src/Entity/QueueItem.ts b/packages/discord/src/Entity/QueueItem.ts index 81745d5..0144c94 100644 --- a/packages/discord/src/Entity/QueueItem.ts +++ b/packages/discord/src/Entity/QueueItem.ts @@ -4,7 +4,7 @@ import { Owner } from './Owner'; import { Queue, type Queue as QueueType } from './Queue'; @Entity() -@Unique('queue-name', ['queue', 'name']) +@Unique('queue-item-queue-name', ['queue', 'name']) export class QueueItem { @PrimaryGeneratedColumn('increment') public id: number;