Skip to content

Commit d0317a8

Browse files
thecotnegharbi-bdr
authored andcommitted
merge migration files
1 parent c04e94b commit d0317a8

File tree

2 files changed

+2
-18
lines changed

2 files changed

+2
-18
lines changed

indexer/src/migrations/1706887624061-migration.ts

Lines changed: 0 additions & 14 deletions
This file was deleted.

indexer/src/migrations/1706881078134-migration.ts renamed to indexer/src/migrations/1706901069486-migration.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
import { MigrationInterface, QueryRunner } from "typeorm";
22

3-
export class migration1706881078134 implements MigrationInterface {
4-
name = 'migration1706881078134'
3+
export class migration1706901069486 implements MigrationInterface {
4+
name = 'migration1706901069486'
55

66
public async up(queryRunner: QueryRunner): Promise<void> {
77
await queryRunner.query(`DELETE FROM "typeorm_metadata" WHERE "type" = $1 AND "name" = $2 AND "schema" = $3`, ["MATERIALIZED_VIEW","infinite","public"]);
88
await queryRunner.query(`DROP MATERIALIZED VIEW "infinite"`);
99
await queryRunner.query(`DELETE FROM "typeorm_metadata" WHERE "type" = $1 AND "name" = $2 AND "schema" = $3`, ["MATERIALIZED_VIEW","creator","public"]);
1010
await queryRunner.query(`DROP MATERIALIZED VIEW "creator"`);
1111
await queryRunner.query(`ALTER TABLE "event" DROP CONSTRAINT "FK_55151d22981cfae04b8ea74fe78"`);
12-
await queryRunner.query(`ALTER TABLE "event" ALTER COLUMN "blockHash" SET NOT NULL`);
1312
await queryRunner.query(`CREATE MATERIALIZED VIEW "creator" AS
1413
select event."txHash" "transactionHash",
1514
event."name" "transactionType",
@@ -99,7 +98,6 @@ export class migration1706881078134 implements MigrationInterface {
9998
await queryRunner.query(`DROP MATERIALIZED VIEW "infinite"`);
10099
await queryRunner.query(`DELETE FROM "typeorm_metadata" WHERE "type" = $1 AND "name" = $2 AND "schema" = $3`, ["MATERIALIZED_VIEW","creator","public"]);
101100
await queryRunner.query(`DROP MATERIALIZED VIEW "creator"`);
102-
await queryRunner.query(`ALTER TABLE "event" ALTER COLUMN "blockHash" DROP NOT NULL`);
103101
await queryRunner.query(`ALTER TABLE "event" ADD CONSTRAINT "FK_55151d22981cfae04b8ea74fe78" FOREIGN KEY ("blockHash") REFERENCES "block"("hash") ON DELETE CASCADE ON UPDATE NO ACTION`);
104102
await queryRunner.query(`CREATE MATERIALIZED VIEW "creator" AS select event."txHash" "transactionHash",
105103
event."name" "transactionType",

0 commit comments

Comments
 (0)