|
| 1 | +import { MigrationInterface, QueryRunner } from "typeorm"; |
| 2 | + |
| 3 | +export class Migration1741722842647 implements MigrationInterface { |
| 4 | + name = 'Migration1741722842647' |
| 5 | + |
| 6 | + public async up(queryRunner: QueryRunner): Promise<void> { |
| 7 | + await queryRunner.query(`CREATE INDEX "IDX_02755ce1b56a981eef76c0b59b" ON "epoch" ("marketId") `); |
| 8 | + await queryRunner.query(`CREATE INDEX "IDX_f89ec06faf22da268399ae6a9b" ON "epoch" ("epochId") `); |
| 9 | + await queryRunner.query(`CREATE INDEX "IDX_187fa56af532560ce204719ea3" ON "resource_price" ("resourceId") `); |
| 10 | + await queryRunner.query(`CREATE INDEX "IDX_5bbe200849d138539d19b7caa6" ON "resource_price" ("blockNumber") `); |
| 11 | + await queryRunner.query(`CREATE INDEX "IDX_a369700ab879af9ef6061c6dbe" ON "resource_price" ("timestamp") `); |
| 12 | + await queryRunner.query(`CREATE INDEX "IDX_82453de75cd894e19c42844e70" ON "resource" ("slug") `); |
| 13 | + await queryRunner.query(`CREATE INDEX "IDX_58232d6050e212b4a0f7eb02da" ON "market" ("address") `); |
| 14 | + await queryRunner.query(`CREATE INDEX "IDX_33f985ce349688238dfeb8560e" ON "market" ("chainId") `); |
| 15 | + await queryRunner.query(`CREATE INDEX "IDX_5430e2d7fe1df2bcada2c12deb" ON "event" ("blockNumber") `); |
| 16 | + await queryRunner.query(`CREATE INDEX "IDX_2c15918ff289396205521c5f3c" ON "event" ("timestamp") `); |
| 17 | + await queryRunner.query(`CREATE INDEX "IDX_a9346cdd1ea1e53a6b87e409ad" ON "market_price" ("timestamp") `); |
| 18 | + await queryRunner.query(`CREATE INDEX "IDX_1ebf6f07652ca11d9f4618b64a" ON "collateral_transfer" ("transactionHash") `); |
| 19 | + await queryRunner.query(`CREATE INDEX "IDX_927edd2b828777f0052366195e" ON "position" ("positionId") `); |
| 20 | + } |
| 21 | + |
| 22 | + public async down(queryRunner: QueryRunner): Promise<void> { |
| 23 | + await queryRunner.query(`DROP INDEX "public"."IDX_927edd2b828777f0052366195e"`); |
| 24 | + await queryRunner.query(`DROP INDEX "public"."IDX_1ebf6f07652ca11d9f4618b64a"`); |
| 25 | + await queryRunner.query(`DROP INDEX "public"."IDX_a9346cdd1ea1e53a6b87e409ad"`); |
| 26 | + await queryRunner.query(`DROP INDEX "public"."IDX_2c15918ff289396205521c5f3c"`); |
| 27 | + await queryRunner.query(`DROP INDEX "public"."IDX_5430e2d7fe1df2bcada2c12deb"`); |
| 28 | + await queryRunner.query(`DROP INDEX "public"."IDX_33f985ce349688238dfeb8560e"`); |
| 29 | + await queryRunner.query(`DROP INDEX "public"."IDX_58232d6050e212b4a0f7eb02da"`); |
| 30 | + await queryRunner.query(`DROP INDEX "public"."IDX_82453de75cd894e19c42844e70"`); |
| 31 | + await queryRunner.query(`DROP INDEX "public"."IDX_a369700ab879af9ef6061c6dbe"`); |
| 32 | + await queryRunner.query(`DROP INDEX "public"."IDX_5bbe200849d138539d19b7caa6"`); |
| 33 | + await queryRunner.query(`DROP INDEX "public"."IDX_187fa56af532560ce204719ea3"`); |
| 34 | + await queryRunner.query(`DROP INDEX "public"."IDX_f89ec06faf22da268399ae6a9b"`); |
| 35 | + await queryRunner.query(`DROP INDEX "public"."IDX_02755ce1b56a981eef76c0b59b"`); |
| 36 | + } |
| 37 | + |
| 38 | +} |
0 commit comments