|
1 |
| -import { MigrationInterface, QueryRunner } from "typeorm"; |
| 1 | +import { MigrationInterface, QueryRunner } from 'typeorm'; |
2 | 2 |
|
3 | 3 | export class Migration1741722842647 implements MigrationInterface {
|
4 |
| - name = 'Migration1741722842647' |
| 4 | + name = 'Migration1741722842647'; |
5 | 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 |
| - } |
| 6 | + public async up(queryRunner: QueryRunner): Promise<void> { |
| 7 | + await queryRunner.query( |
| 8 | + `CREATE INDEX "IDX_02755ce1b56a981eef76c0b59b" ON "epoch" ("marketId") ` |
| 9 | + ); |
| 10 | + await queryRunner.query( |
| 11 | + `CREATE INDEX "IDX_f89ec06faf22da268399ae6a9b" ON "epoch" ("epochId") ` |
| 12 | + ); |
| 13 | + await queryRunner.query( |
| 14 | + `CREATE INDEX "IDX_187fa56af532560ce204719ea3" ON "resource_price" ("resourceId") ` |
| 15 | + ); |
| 16 | + await queryRunner.query( |
| 17 | + `CREATE INDEX "IDX_5bbe200849d138539d19b7caa6" ON "resource_price" ("blockNumber") ` |
| 18 | + ); |
| 19 | + await queryRunner.query( |
| 20 | + `CREATE INDEX "IDX_a369700ab879af9ef6061c6dbe" ON "resource_price" ("timestamp") ` |
| 21 | + ); |
| 22 | + await queryRunner.query( |
| 23 | + `CREATE INDEX "IDX_82453de75cd894e19c42844e70" ON "resource" ("slug") ` |
| 24 | + ); |
| 25 | + await queryRunner.query( |
| 26 | + `CREATE INDEX "IDX_58232d6050e212b4a0f7eb02da" ON "market" ("address") ` |
| 27 | + ); |
| 28 | + await queryRunner.query( |
| 29 | + `CREATE INDEX "IDX_33f985ce349688238dfeb8560e" ON "market" ("chainId") ` |
| 30 | + ); |
| 31 | + await queryRunner.query( |
| 32 | + `CREATE INDEX "IDX_5430e2d7fe1df2bcada2c12deb" ON "event" ("blockNumber") ` |
| 33 | + ); |
| 34 | + await queryRunner.query( |
| 35 | + `CREATE INDEX "IDX_2c15918ff289396205521c5f3c" ON "event" ("timestamp") ` |
| 36 | + ); |
| 37 | + await queryRunner.query( |
| 38 | + `CREATE INDEX "IDX_a9346cdd1ea1e53a6b87e409ad" ON "market_price" ("timestamp") ` |
| 39 | + ); |
| 40 | + await queryRunner.query( |
| 41 | + `CREATE INDEX "IDX_1ebf6f07652ca11d9f4618b64a" ON "collateral_transfer" ("transactionHash") ` |
| 42 | + ); |
| 43 | + await queryRunner.query( |
| 44 | + `CREATE INDEX "IDX_927edd2b828777f0052366195e" ON "position" ("positionId") ` |
| 45 | + ); |
| 46 | + } |
37 | 47 |
|
| 48 | + public async down(queryRunner: QueryRunner): Promise<void> { |
| 49 | + await queryRunner.query( |
| 50 | + `DROP INDEX "public"."IDX_927edd2b828777f0052366195e"` |
| 51 | + ); |
| 52 | + await queryRunner.query( |
| 53 | + `DROP INDEX "public"."IDX_1ebf6f07652ca11d9f4618b64a"` |
| 54 | + ); |
| 55 | + await queryRunner.query( |
| 56 | + `DROP INDEX "public"."IDX_a9346cdd1ea1e53a6b87e409ad"` |
| 57 | + ); |
| 58 | + await queryRunner.query( |
| 59 | + `DROP INDEX "public"."IDX_2c15918ff289396205521c5f3c"` |
| 60 | + ); |
| 61 | + await queryRunner.query( |
| 62 | + `DROP INDEX "public"."IDX_5430e2d7fe1df2bcada2c12deb"` |
| 63 | + ); |
| 64 | + await queryRunner.query( |
| 65 | + `DROP INDEX "public"."IDX_33f985ce349688238dfeb8560e"` |
| 66 | + ); |
| 67 | + await queryRunner.query( |
| 68 | + `DROP INDEX "public"."IDX_58232d6050e212b4a0f7eb02da"` |
| 69 | + ); |
| 70 | + await queryRunner.query( |
| 71 | + `DROP INDEX "public"."IDX_82453de75cd894e19c42844e70"` |
| 72 | + ); |
| 73 | + await queryRunner.query( |
| 74 | + `DROP INDEX "public"."IDX_a369700ab879af9ef6061c6dbe"` |
| 75 | + ); |
| 76 | + await queryRunner.query( |
| 77 | + `DROP INDEX "public"."IDX_5bbe200849d138539d19b7caa6"` |
| 78 | + ); |
| 79 | + await queryRunner.query( |
| 80 | + `DROP INDEX "public"."IDX_187fa56af532560ce204719ea3"` |
| 81 | + ); |
| 82 | + await queryRunner.query( |
| 83 | + `DROP INDEX "public"."IDX_f89ec06faf22da268399ae6a9b"` |
| 84 | + ); |
| 85 | + await queryRunner.query( |
| 86 | + `DROP INDEX "public"."IDX_02755ce1b56a981eef76c0b59b"` |
| 87 | + ); |
| 88 | + } |
38 | 89 | }
|
0 commit comments