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

chore: Explicitly set default auto field #108

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

Conversation

heindrickdumdum0217
Copy link

@heindrickdumdum0217 heindrickdumdum0217 commented Mar 26, 2024

https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field

Users may set DEFAULT_AUTO_FIELD to django.db.models.BigAutoField in settings.
In that case, it will create an additional migration file which updates APIRequestLog table id to BigAutoField.
And it's causing problem during the migration in each deployment and testing with tox.

If we explicitly set default_auto_field in app config, we can avoid unexpected migration.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @heindrickdumdum0217 - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Docstrings: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

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.

1 participant