Skip to content

Commit

Permalink
Merge pull request #89 from sotatek-dev/fix/crawler-amount-received
Browse files Browse the repository at this point in the history
feat: add index for tx_hash_lock
  • Loading branch information
Sotatek-TanHoang authored Sep 25, 2024
2 parents 3392d08 + f73e7cc commit a497bc9
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/database/migrations/1727258557893-create-index-event-logs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { MigrationInterface, QueryRunner, TableIndex } from 'typeorm';

export class CreateIndexEventLogs1727258557893 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.createIndex(
'event_logs',
new TableIndex({
name: 'index-tx-hash-lock',
columnNames: ['tx_hash_lock'],
isUnique: true,
}),
);
}

public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.dropIndex('event_logs', 'index-tx-hash-lock');
}
}

0 comments on commit a497bc9

Please sign in to comment.