-
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: migrate HubPoolIndexer to new Indexer (#52)
Co-authored-by: Alexandru Matei <alexandrumatei3693@gmail.com>
- Loading branch information
1 parent
b50f8ac
commit c9e7da4
Showing
15 changed files
with
364 additions
and
260 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
Dockerfile | ||
docker-compose.yml | ||
out | ||
volumes | ||
**/dist | ||
**/node_modules | ||
|
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
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
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
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
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
53 changes: 53 additions & 0 deletions
53
packages/indexer-database/src/migrations/1727686818331-HubPoolFinalised.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,53 @@ | ||
import { MigrationInterface, QueryRunner } from "typeorm"; | ||
|
||
export class HubPoolFinalised1727686818331 implements MigrationInterface { | ||
name = "HubPoolFinalised1727686818331"; | ||
|
||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
`ALTER TABLE "evm"."set_pool_rebalance_route" DROP CONSTRAINT "UK_setPoolRebalanceRoute_transactionHash_transactionIndex_logIn"`, | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "evm"."set_pool_rebalance_route" ADD CONSTRAINT "UK_spr_transactionHash_transactionIndex_logIndex" UNIQUE ("transactionHash", "transactionIndex", "logIndex")`, | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "evm"."proposed_root_bundle" ADD "finalised" boolean NOT NULL`, | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "evm"."root_bundle_disputed" ADD "finalised" boolean NOT NULL`, | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "evm"."root_bundle_executed" ADD "finalised" boolean NOT NULL`, | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "evm"."root_bundle_canceled" ADD "finalised" boolean NOT NULL`, | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "evm"."set_pool_rebalance_route" ADD "finalised" boolean NOT NULL`, | ||
); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
`ALTER TABLE "evm"."set_pool_rebalance_route" DROP CONSTRAINT "UK_spr_transactionHash_transactionIndex_logIndex"`, | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "evm"."set_pool_rebalance_route" ADD CONSTRAINT "UK_setPoolRebalanceRoute_transactionHash_transactionIndex_logIn" UNIQUE ("transactionHash", "transactionIndex", "logIndex")`, | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "evm"."set_pool_rebalance_route" DROP COLUMN "finalised"`, | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "evm"."root_bundle_executed" DROP COLUMN "finalised"`, | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "evm"."root_bundle_disputed" DROP COLUMN "finalised"`, | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "evm"."proposed_root_bundle" DROP COLUMN "finalised"`, | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "evm"."root_bundle_canceled" DROP COLUMN "finalised"`, | ||
); | ||
} | ||
} |
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
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
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
Oops, something went wrong.