Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue where a single item could have duplicate shortcuts #1177

Merged
merged 4 commits into from
Oct 13, 2022

Commits on Oct 12, 2022

  1. core: make item migration fall through all db versions

    this was not exactly a bug but it can cause a lot of unintended
    behaviour. Previously, you'd have to manually specify which version the
    item migration should jump to. This was buggy and poorly designed.
    This change makes the item iterate over all the db migrations one by one
    automatically.
    
    For example:
    
    An item at version 5.2 will go through:
    - 5.3
    - 5.4
    - and so on
    thecodrr committed Oct 12, 2022
    Configuration menu
    Copy the full SHA
    4d876e3 View commit details
    Browse the repository at this point in the history
  2. core: change db keys to include collection name

    This should not affect the items or their server representation.
    This change is necessary to allow multiple items with same id
    that live in different collections.
    For example, shortcuts have the same id as the inner reference they
    point to. This was not possible before and would cause an overwrite
    of the original value.
    thecodrr committed Oct 12, 2022
    Configuration menu
    Copy the full SHA
    61f5ea6 View commit details
    Browse the repository at this point in the history
  3. core: item should only have a single shortcut

    this changes the shortcut ids & deduplicates the old ones so that
    there is always only 1 shortcut of a given item (notebook, topic or tag).
    thecodrr committed Oct 12, 2022
    Configuration menu
    Copy the full SHA
    4ab68bc View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1cffff3 View commit details
    Browse the repository at this point in the history