Skip to content

Commit

Permalink
Unique index names
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptiklemur committed May 17, 2023
1 parent 62692b6 commit 4abfcff
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/discord/src/Entity/Printer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion packages/discord/src/Entity/Queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion packages/discord/src/Entity/QueueItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4abfcff

Please sign in to comment.