This commit is contained in:
natib21
2026-07-02 13:18:34 +00:00
parent e429a2cebf
commit 1869790eab

View File

@@ -94,7 +94,7 @@ export class AddServiceTypesAndCargoTypes1748427600000 implements MigrationInter
// Create indexes for service_types
const table = await queryRunner.getTable("freight.service_types");
if (table && !(await queryRunner.hasIndex("freight.service_types", "IDX_SERVICE_TYPES_IS_ACTIVE"))) {
if (table && !table.indices.some((idx) => idx.name === "IDX_SERVICE_TYPES_IS_ACTIVE")) {
await queryRunner.createIndex(
"freight.service_types",
new TableIndex({
@@ -103,7 +103,7 @@ export class AddServiceTypesAndCargoTypes1748427600000 implements MigrationInter
}),
);
}
if (table && !(await queryRunner.hasIndex("freight.service_types", "IDX_SERVICE_TYPES_DISPLAY_ORDER"))) {
if (table && !table.indices.some((idx) => idx.name === "IDX_SERVICE_TYPES_DISPLAY_ORDER")) {
await queryRunner.createIndex(
"freight.service_types",
new TableIndex({