Skip to content

Commit

Permalink
Make index on block and event index unique in event table
Browse files Browse the repository at this point in the history
  • Loading branch information
prathamesh0 committed Sep 16, 2022
1 parent 31f0d44 commit 26ea833
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/uni-info-watcher/src/entity/Event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { BlockProgress } from './BlockProgress';

@Entity()
// Index to query events by block and event index.
@Index(['block', 'index'])
@Index(['block', 'index'], { unique: true })
export class Event {
@PrimaryGeneratedColumn()
id!: number;
Expand Down
2 changes: 1 addition & 1 deletion packages/uni-watcher/src/entity/Event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const UNKNOWN_EVENT_NAME = '__unknown__';

@Entity()
// Index to query events by block and event index.
@Index(['block', 'index'])
@Index(['block', 'index'], { unique: true })
export class Event {
@PrimaryGeneratedColumn()
id!: number;
Expand Down

0 comments on commit 26ea833

Please sign in to comment.