You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Below schema results in migration generation with the index create/drop calls happening 3 times. We fixed it by adding below visited array to filterIndices in typeorm/metadata-args/MetadataArgsStorage.js
Problem seems to be the metadata builder for some reasons loads indices three times (can't figure out where this is happening exactly).
import{MigrationInterface,QueryRunner}from"typeorm";exportclasstest1573371622105implementsMigrationInterface{publicasyncup(queryRunner: QueryRunner): Promise<any>{awaitqueryRunner.query(`CREATE TABLE "public"."authenticators" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "createdAt" TIMESTAMP NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP NOT NULL DEFAULT now(), "code" character varying, CONSTRAINT "PK_ca66aa0ff269b0314c053ba20a2" PRIMARY KEY ("id"))`);awaitqueryRunner.query(`CREATE UNIQUE INDEX "IDX_b301987c9252892c34fdface66" ON "public"."authenticators" ("code") `);awaitqueryRunner.query(`CREATE UNIQUE INDEX "IDX_b301987c9252892c34fdface66" ON "public"."authenticators" ("code") `);awaitqueryRunner.query(`CREATE UNIQUE INDEX "IDX_b301987c9252892c34fdface66" ON "public"."authenticators" ("code") `);}publicasyncdown(queryRunner: QueryRunner): Promise<any>{awaitqueryRunner.query(`DROP INDEX "public"."IDX_b301987c9252892c34fdface66"`);awaitqueryRunner.query(`DROP INDEX "public"."IDX_b301987c9252892c34fdface66"`);awaitqueryRunner.query(`DROP INDEX "public"."IDX_b301987c9252892c34fdface66"`);awaitqueryRunner.query(`DROP TABLE "public"."authenticators"`);}}
Issue type:
[X] bug report
Database system/driver:
[X]
postgres
TypeORM version:
[X]
0.2.18
(or put your version here)Below schema results in migration generation with the index create/drop calls happening 3 times. We fixed it by adding below visited array to filterIndices in
typeorm/metadata-args/MetadataArgsStorage.js
Problem seems to be the metadata builder for some reasons loads indices three times (can't figure out where this is happening exactly).
seems related to #3280 and #4577
The text was updated successfully, but these errors were encountered: