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

Primary key must now be explicit #35

Open
lifenautjoe opened this issue Oct 15, 2021 · 0 comments
Open

Primary key must now be explicit #35

lifenautjoe opened this issue Oct 15, 2021 · 0 comments

Comments

@lifenautjoe
Copy link
Contributor

In latest django versions a warning is emitted when models do not explicitly define a primary key.

(somus-api) ~/Documents/code/somus/somus-api(hotfix/video-encoding-update ✗) python manage.py runserver
2021-10-15 23:16:56,588 django.utils.autoreload INFO     Watching for file changes with StatReloader
Performing system checks...

System check identified some issues:

WARNINGS:
video_encoding.Format: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.
	HINT: Configure the DEFAULT_AUTO_FIELD setting or the AppConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.

I'll come back with a PR shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants