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

Set app's default_auto_field to match current migrations #138

Closed
wants to merge 1 commit into from

Conversation

blueyed
Copy link
Contributor

@blueyed blueyed commented Jun 7, 2022

Without this it would use DEFAULT_AUTO_FIELD from the project's
settings, where the default changed to BigAutoField.

docs: https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
ref: https://stackoverflow.com/a/67007098/15690

Without this it would use `DEFAULT_AUTO_FIELD` from the project's
settings, where the default changed to `BigAutoField`.

docs: https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
ref: https://stackoverflow.com/a/67007098/15690
@codecov
Copy link

codecov bot commented Jun 7, 2022

Codecov Report

Merging #138 (fb0e017) into master (2da6e3c) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #138   +/-   ##
=======================================
  Coverage   95.05%   95.06%           
=======================================
  Files          25       25           
  Lines         506      507    +1     
=======================================
+ Hits          481      482    +1     
  Misses         25       25           
Impacted Files Coverage Δ
django_fsm_log/apps.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2da6e3c...fb0e017. Read the comment docs.

@MRigal
Copy link
Member

MRigal commented Jun 7, 2022

@blueyed please see history of a previous PR at #132

@blueyed
Copy link
Contributor Author

blueyed commented Jun 15, 2022

Ok, closing then.

FWIW: I'm using a customized app for this now:

from django_fsm_log.apps import DjangoFSMLogAppConfig


class ModifiedDjangoFSMLogAppConfig(DjangoFSMLogAppConfig):
    # Do not trigger a migration in 3rd party app.
    # (https://github.com/jazzband/django-fsm-log/pull/1328)
    default_auto_field = "django.db.models.AutoField"

Another solution might be to also adjust your project settings to keep using the previous default (AutoField).

@blueyed blueyed closed this Jun 15, 2022
@blueyed blueyed deleted the fix-migration branch June 15, 2022 08:05
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