Skip to content

Commit

Permalink
fix: remove troublesome migration that was not really needed (#1725)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbouwman authored Nov 7, 2024
1 parent 9828d17 commit a075492
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 114 deletions.
24 changes: 0 additions & 24 deletions packages/common/src/sites/_internal/_ensureLegacySiteCatalog.ts

This file was deleted.

4 changes: 1 addition & 3 deletions packages/common/src/sites/upgrade-site-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { migrateBadBasemap } from "./_internal/migrateBadBasemap";
import { ensureBaseTelemetry } from "./_internal/ensureBaseTelemetry";
import { migrateWebMappingApplicationSites } from "./_internal/migrateWebMappingApplicationSites";
import { _migrateLinkUnderlinesCapability } from "./_internal/_migrate-link-underlines-capability";
import { _ensureLegacySiteCatalog } from "./_internal/_ensureLegacySiteCatalog";

/**
* Upgrades the schema upgrades
Expand Down Expand Up @@ -44,7 +43,6 @@ export function upgradeSiteSchema(model: IModel) {
model = ensureBaseTelemetry(model);
model = migrateWebMappingApplicationSites(model);
model = _migrateLinkUnderlinesCapability(model);
// This will only make changes to sites with schemaVersion 1.5 or lower
model = _ensureLegacySiteCatalog(model);

return model;
}

This file was deleted.

8 changes: 2 additions & 6 deletions packages/common/test/sites/upgrade-site-schema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import * as _migrateTelemetryConfig from "../../src/sites/_internal/_migrate-tel
import * as _migrateLinkUnderlinesCapability from "../../src/sites/_internal/_migrate-link-underlines-capability";
import * as migrateBadBasemapModule from "../../src/sites/_internal/migrateBadBasemap";
import * as ensureBaseTelemetry from "../../src/sites/_internal/ensureBaseTelemetry";
import * as _ensureLegacySiteCatalog from "../../src/sites/_internal/_ensureLegacySiteCatalog";

import { IModel } from "../../src";
import { SITE_SCHEMA_VERSION } from "../../src/sites/site-schema-version";
import { expectAllCalled, expectAll } from "./test-helpers.test";
Expand All @@ -29,7 +29,7 @@ describe("upgradeSiteSchema", () => {
let migrateLinkUnderlinesCapabilitySpy: jasmine.Spy;
let migrateBadBasemapSpy: jasmine.Spy;
let ensureBaseTelemetrySpy: jasmine.Spy;
let ensureLegacySiteCatalog: jasmine.Spy;

beforeEach(() => {
applySpy = spyOn(_applySiteSchemaModule, "_applySiteSchema").and.callFake(
(model: IModel) => model
Expand Down Expand Up @@ -78,10 +78,6 @@ describe("upgradeSiteSchema", () => {
ensureBaseTelemetry,
"ensureBaseTelemetry"
).and.callFake((model: IModel) => model);
ensureLegacySiteCatalog = spyOn(
_ensureLegacySiteCatalog,
"_ensureLegacySiteCatalog"
).and.callFake((model: IModel) => model);
});

it("runs schema upgrades", async () => {
Expand Down

0 comments on commit a075492

Please sign in to comment.