-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add depositTxHash index to RelayHashInfo table (#127)
- Loading branch information
1 parent
5ab0309
commit c168c0a
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
packages/indexer-database/src/migrations/1733247042958-RelayHashInfo.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { MigrationInterface, QueryRunner } from "typeorm"; | ||
|
||
export class RelayHashInfo1733247042958 implements MigrationInterface { | ||
name = "RelayHashInfo1733247042958"; | ||
|
||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
`CREATE INDEX "IX_rhi_depositTxHash" ON "relay_hash_info" ("depositTxHash") `, | ||
); | ||
await queryRunner.query( | ||
`CREATE INDEX "IX_rhi_originChainId_depositId" ON "relay_hash_info" ("originChainId", "depositId") `, | ||
); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
`DROP INDEX "public"."IX_rhi_originChainId_depositId"`, | ||
); | ||
await queryRunner.query(`DROP INDEX "public"."IX_rhi_depositTxHash"`); | ||
} | ||
} |