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

Removes the unsupported "ON CONFLICT DO NOTHING" clause #103

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ArthurNRL
Copy link

Subject:

Feature or Bugfix

  • Bugfix

Purpose

  • This PR marks supports_ignore_conflicts as an unsupported database feature and overrides default postgres backend function so it doesn't use the unsupported "ON CONFLICT DO NOTHING" clause.

Detail

Relates

@codecov
Copy link

codecov bot commented Jun 21, 2022

Codecov Report

Merging #103 (b158c6b) into master (57b3d4a) will increase coverage by 0.69%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #103      +/-   ##
==========================================
+ Coverage   64.00%   64.70%   +0.69%     
==========================================
  Files           4        4              
  Lines         439      442       +3     
  Branches      127      127              
==========================================
+ Hits          281      286       +5     
+ Misses        116      115       -1     
+ Partials       42       41       -1     
Impacted Files Coverage Δ
django_redshift_backend/base.py 63.99% <100.00%> (+0.75%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 57b3d4a...b158c6b. Read the comment docs.

@shimizukawa shimizukawa linked an issue Jun 21, 2022 that may be closed by this pull request
Copy link
Member

@shimizukawa shimizukawa left a comment

Choose a reason for hiding this comment

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

Thank you for your cooperation!
I have two requests.

  1. please fix the Lint error I am getting in CI.
    https://github.com/jazzband/django-redshift-backend/runs/6991793050?check_suite_focus=true
    pre-commit.ci also has an error, but it is fine as is!

  2. can you also write a UnitTest?
    I think there is a UnitTest at https://github.com/jazzband/django-redshift-backend/blob/master/tests/test_redshift_backend.py that you can refer to.

@ArthurNRL
Copy link
Author

I can do that this weekend

@ArthurNRL
Copy link
Author

Hey, I fixed the lint issue, but I'm having trouble setting the test case up. I would need to run migrations on a db since model.add() needs the model to be saved on the db, but none of the tests in there, other than the migration ones, actually interact with the db.

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.

Error when adding to ManyToManyField
2 participants