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

Distinct null values on IssueLink constraints #2537

Closed
La0 opened this issue Nov 25, 2024 · 1 comment · Fixed by #2551 · May be fixed by #2539
Closed

Distinct null values on IssueLink constraints #2537

La0 opened this issue Nov 25, 2024 · 1 comment · Fixed by #2551 · May be fixed by #2539
Assignees

Comments

@La0
Copy link
Collaborator

La0 commented Nov 25, 2024

While working on #2536 I found out that we can have duplicate IssueLink with the same positioning arguments (nb_lines, line, char), provided one of these values is NULL.

This is because Django defaults (and the databases default behaviour) makes the nullable values as distinct ones (so it does not trigger the constraint).

If I understand correctly the notes on Django doc, only Postgresql 15+ is supported to use nulls_distinct=False

@La0
Copy link
Collaborator Author

La0 commented Nov 25, 2024

I have made some unit tests that should pass if the constraint worked as expected.

By using nulls_distinct=False, we see that the tests are OK... on postgresql.

So this means that the CI must use a postgresql server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant