From 26ca52cd81c532c1a805ce25c40b47a1f75c8fec Mon Sep 17 00:00:00 2001 From: petarTxFusion Date: Wed, 18 Dec 2024 12:02:37 +0100 Subject: [PATCH] fix: fix migrations --- .../1734453474315-MakeTransactionToFieldOptional.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/packages/worker/src/migrations/1734453474315-MakeTransactionToFieldOptional.ts b/packages/worker/src/migrations/1734453474315-MakeTransactionToFieldOptional.ts index a087b77d9..5d0e8a1cb 100644 --- a/packages/worker/src/migrations/1734453474315-MakeTransactionToFieldOptional.ts +++ b/packages/worker/src/migrations/1734453474315-MakeTransactionToFieldOptional.ts @@ -5,21 +5,13 @@ export class MakeTransactionToFieldOptional1734453474315 implements MigrationInt public async up(queryRunner: QueryRunner): Promise { await queryRunner.query(`ALTER TABLE "transactions" ALTER COLUMN "to" DROP NOT NULL`); - await queryRunner.query(`DROP INDEX "public"."IDX_f8b841e005e13e12008d9778ed"`); await queryRunner.query(`ALTER TABLE "addressTransactions" ALTER COLUMN "address" DROP NOT NULL`); await queryRunner.query(`ALTER TABLE "transactionReceipts" ALTER COLUMN "to" DROP NOT NULL`); - await queryRunner.query( - `CREATE INDEX "IDX_f8b841e005e13e12008d9778ed" ON "addressTransactions" ("address", "blockNumber", "receivedAt", "transactionIndex") ` - ); } public async down(queryRunner: QueryRunner): Promise { - await queryRunner.query(`DROP INDEX "public"."IDX_f8b841e005e13e12008d9778ed"`); await queryRunner.query(`ALTER TABLE "transactionReceipts" ALTER COLUMN "to" SET NOT NULL`); await queryRunner.query(`ALTER TABLE "addressTransactions" ALTER COLUMN "address" SET NOT NULL`); - await queryRunner.query( - `CREATE INDEX "IDX_f8b841e005e13e12008d9778ed" ON "addressTransactions" ("address", "blockNumber", "receivedAt", "transactionIndex") ` - ); await queryRunner.query(`ALTER TABLE "transactions" ALTER COLUMN "to" SET NOT NULL`); } }