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

refactor: drop django-mptt in favour of django-tree-queries #473

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

winged
Copy link
Contributor

@winged winged commented Jun 4, 2024

Django-Tree-Queries works with recursive CTEs (common table expressions) to deal with hierarchical relationships, generally achieving the same result, but without the right, left and tree_id fields.

Django-MPTT has been unmaintained for several years, and we're suspecting some subtle bugs in it that we can't really reproduce or verify right now. Anyway it's a good time to get rid of it.

BREAKING! This breaks if Emeis is used as a Django app directly, and depends on any of the MPTT API / features.

@winged winged requested a review from czosel June 4, 2024 12:38
Copy link
Contributor

@czosel czosel left a comment

Choose a reason for hiding this comment

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

Nice work!

@czosel
Copy link
Contributor

czosel commented Jun 5, 2024

Once the conflicts are resolved we can merge 👍

@winged winged force-pushed the drop_mptt branch 5 times, most recently from b742f34 to 949f4ab Compare June 5, 2024 13:36
Django-Tree-Queries works with recursive CTEs (common table expressions) to deal
with hierarchical relationships, generally achieving the same result, but without
the `right`, `left` and `tree_id` fields.

Django-MPTT has been unmaintained for several years, and we're suspecting some
subtle bugs in it that we can't really reproduce or verify right now. Anyway it's
a good time to get rid of it.

Note: Some old migrations needed to be changed, as we cannot refer to
MPTT fields anymore. They were essentially regular foreign keys however,
so this won't break the database.

BREAKING! This breaks if Emeis is used as a Django app directly, and depends on
any of the MPTT API / features.
@czosel czosel merged commit 9e99357 into projectcaluma:main Jun 5, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants