|
1 | 1 | import { MigrationInterface, QueryRunner } from "typeorm"; |
2 | 2 |
|
3 | | -export class migration1706881078134 implements MigrationInterface { |
4 | | - name = 'migration1706881078134' |
| 3 | +export class migration1706901069486 implements MigrationInterface { |
| 4 | + name = 'migration1706901069486' |
5 | 5 |
|
6 | 6 | public async up(queryRunner: QueryRunner): Promise<void> { |
7 | 7 | await queryRunner.query(`DELETE FROM "typeorm_metadata" WHERE "type" = $1 AND "name" = $2 AND "schema" = $3`, ["MATERIALIZED_VIEW","infinite","public"]); |
8 | 8 | await queryRunner.query(`DROP MATERIALIZED VIEW "infinite"`); |
9 | 9 | await queryRunner.query(`DELETE FROM "typeorm_metadata" WHERE "type" = $1 AND "name" = $2 AND "schema" = $3`, ["MATERIALIZED_VIEW","creator","public"]); |
10 | 10 | await queryRunner.query(`DROP MATERIALIZED VIEW "creator"`); |
11 | 11 | await queryRunner.query(`ALTER TABLE "event" DROP CONSTRAINT "FK_55151d22981cfae04b8ea74fe78"`); |
12 | | - await queryRunner.query(`ALTER TABLE "event" ALTER COLUMN "blockHash" SET NOT NULL`); |
13 | 12 | await queryRunner.query(`CREATE MATERIALIZED VIEW "creator" AS |
14 | 13 | select event."txHash" "transactionHash", |
15 | 14 | event."name" "transactionType", |
@@ -99,7 +98,6 @@ export class migration1706881078134 implements MigrationInterface { |
99 | 98 | await queryRunner.query(`DROP MATERIALIZED VIEW "infinite"`); |
100 | 99 | await queryRunner.query(`DELETE FROM "typeorm_metadata" WHERE "type" = $1 AND "name" = $2 AND "schema" = $3`, ["MATERIALIZED_VIEW","creator","public"]); |
101 | 100 | await queryRunner.query(`DROP MATERIALIZED VIEW "creator"`); |
102 | | - await queryRunner.query(`ALTER TABLE "event" ALTER COLUMN "blockHash" DROP NOT NULL`); |
103 | 101 | await queryRunner.query(`ALTER TABLE "event" ADD CONSTRAINT "FK_55151d22981cfae04b8ea74fe78" FOREIGN KEY ("blockHash") REFERENCES "block"("hash") ON DELETE CASCADE ON UPDATE NO ACTION`); |
104 | 102 | await queryRunner.query(`CREATE MATERIALIZED VIEW "creator" AS select event."txHash" "transactionHash", |
105 | 103 | event."name" "transactionType", |
|
0 commit comments