django-redshift-backend icon indicating copy to clipboard operation
django-redshift-backend copied to clipboard

Removes the unsupported "ON CONFLICT DO NOTHING" clause

Open ArthurNRL opened this issue 2 years ago • 3 comments

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

ArthurNRL avatar Jun 20 '22 12:06 ArthurNRL

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%) :arrow_up:

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.

codecov[bot] avatar Jun 21 '22 19:06 codecov[bot]

I can do that this weekend

ArthurNRL avatar Jun 22 '22 16:06 ArthurNRL

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.

ArthurNRL avatar Jun 28 '22 19:06 ArthurNRL