Skip to content

Data Loss During Settings Migration (V2 → V1) #13

@akramcodez

Description

@akramcodez

Description

In migrateSettingsToV1, the migration iterates over a reverse mapping and removes the top-level key from v2Keys when a mapped property is found:

v2Keys.delete(newPath.split('.')[0]); // e.g. 'general'

If a top-level object (e.g. general) contains multiple properties—some mapped to V1 and others that are new or custom—processing the first mapped property removes the entire object from v2Keys. As a result, remaining unmapped properties under that object are skipped.

Impact

  • Silent data loss during migration
  • New or custom V2 settings without V1 equivalents are dropped instead of preserved

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions