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

Add an explicit id AutoField #142

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

Conversation

lchojnacki
Copy link

If a Django application uses the setting DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField', Django will suggest generating the migration 0002_alter_template_id, which changes the field type of Template.id.

Creating your own migration in the package is not a good idea, as if an official migration 0002 appears in the future, it will cause a conflict. To avoid this, I've added an explicit id field of type AutoField, maintaining backward compatibility and preventing Django from generating a new migration.

@lchojnacki lchojnacki changed the title Add explicit id AutoField Add anexplicit id AutoField Aug 11, 2024
@lchojnacki lchojnacki changed the title Add anexplicit id AutoField Add an explicit id AutoField Aug 11, 2024
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