florimondmanca / djangorestframework-api-key

πŸ” API key permissions for Django REST Framework
https://florimondmanca.github.io/djangorestframework-api-key/
MIT License
678 stars 104 forks source link

Fix migration 0004 when run against a non default database (updated) #215

Closed florimondmanca closed 2 years ago

florimondmanca commented 2 years ago

This is an update of #185 (which now has conflicts with master that can't be solved via the GitHub UI).

We are using this library on a project that is running tests with a separate test database. Previously due to the missing using statement it would instead try to apply the populate_prefix_hashed_key using the default database connection.

codecov-commenter commented 2 years ago

Codecov Report

Merging #215 (489e4c9) into master (6f76d19) will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #215   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           24        24           
  Lines          595       595           
=========================================
  Hits           595       595           
Impacted Files Coverage Ξ”
tests/conftest.py 100.00% <ΓΈ> (ΓΈ)
...ework_api_key/migrations/0004_prefix_hashed_key.py 100.00% <100.00%> (ΓΈ)

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

florimondmanca commented 2 years ago

And… It's finally in. Thanks a lot @niall-mediasuite for putting time into this. I'll add this in the release batch for 2.3.0.

niall-madecurious commented 2 years ago

Thanks @florimondmanca

niall-madecurious commented 1 year ago

Hi @florimondmanca it doesn't look like this has been release yet. Is it possible to create a new 2.3.0 release or at least a patch for 2.2.0?

florimondmanca commented 1 year ago

@niall-mediasuite Good call. I think we can release 2.3.0 as-is. We've got #210 which is in the "Removed" category, though not keen on being pedantic about semver and issuing 3.0.0 because of Python 3.6 EOL.

niall-madecurious commented 1 year ago

Great, thanks. We had been pulling the library from git but it was beginning to cause issues.