Skip to content

Add DEFAULT_AUTO_FIELD to silence warning on the command line#134

Merged
JackWilb merged 1 commit intomainfrom
fix-autofield-warning
Jun 23, 2022
Merged

Add DEFAULT_AUTO_FIELD to silence warning on the command line#134
JackWilb merged 1 commit intomainfrom
fix-autofield-warning

Conversation

@JackWilb
Copy link
Copy Markdown
Member

Does this PR close any open issues?

No

Give a longer description of what this PR addresses and why it's needed

We were getting a bunch of warnings that look like:

...
api.Upload: (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 ApiConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
api.Workspace: (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 ApiConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
...

Following the advice here, I chose to set it to AutoField so we don't have more migrations to run.

Provide pictures/videos of the behavior before and after these changes (optional)

N/A

Are there any additional TODOs before this PR is ready to go?

No

@JackWilb JackWilb requested a review from waxlamp June 15, 2022 17:15
@JackWilb JackWilb merged commit 6748f0c into main Jun 23, 2022
@JackWilb JackWilb deleted the fix-autofield-warning branch June 23, 2022 16:57
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.

2 participants