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

Explicit default_auto_field. #326

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

JulienPalard
Copy link
Contributor

This is configurable since Django 3.2, which is already the required version for oscar-api.

see:
https://docs.djangoproject.com/en/3.2/topics/db/models/#automatic-primary-key-fields

Explicitly telling which field to use if good, it avoids a supious migration like:

$ ./manage.py makemigrations
Migrations for 'oscarapi':
  /home/mdk/src/django-oscar/.venv/lib/python3.11/site-packages/oscarapi/migrations/0002_alter_apikey_id.py
    - Alter field id on apikey

notice the migration is created in the venv, in oscarapi tree, not in the user project, it won't work anyway.

@JulienPalard
Copy link
Contributor Author

depends on: #327

@specialunderwear
Copy link
Member

Hi please try and rebase to the main branch because your tests are failing because they miss the fixes in there @JulienPalard

This is configurable since Django 3.2, which is already the required
version for oscar-api.

see:
https://docs.djangoproject.com/en/3.2/topics/db/models/#automatic-primary-key-fields

Explicitly telling which field to use if good, it avoids a supious
migration like:

    $ ./manage.py makemigrations
    Migrations for 'oscarapi':
      /home/mdk/src/django-oscar/.venv/lib/python3.11/site-packages/oscarapi/migrations/0002_alter_apikey_id.py
        - Alter field id on apikey

notice the migration is created in the venv, in oscarapi tree, not in
the user project, it won't work anyway.
@JulienPalard
Copy link
Contributor Author

rebased.

@samar-hassan samar-hassan merged commit 045eafa into django-oscar:main Sep 19, 2024
10 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.

3 participants