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 an edge case of embedded table migrations #4694

Merged
merged 1 commit into from
May 14, 2021
Merged

Conversation

ironage
Copy link
Contributor

@ironage ironage commented May 14, 2021

We had a report of migrating to an embedded table not working when it should. Debugging revealed that the changed to embedded was being processed before a link column which pointed to the table was removed. Removing the link column first will remove the incoming links which allows the embedded change to succeed.

☑️ ToDos

  • 📝 Changelog update
  • 🚦 Tests (or not relevant)

@ironage ironage requested review from tgoyne and DominicFrei May 14, 2021 01:27
@ironage ironage self-assigned this May 14, 2021
Copy link
Contributor

@DominicFrei DominicFrei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one! Checked against the example provided in realm/realm-swift#7248 which now correctly fails with the 'objects with no backlinks' error for the orphaned objects in there instead of showing 'too many backlinks'.

@ironage ironage merged commit 9afbd28 into master May 14, 2021
@ironage ironage deleted the js/embedded-migrations branch May 14, 2021 18:23
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants