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

Changing COUPONS_COUPON_TYPES generates additional migrations #29

Open
dmarcelino opened this issue Mar 26, 2018 · 0 comments
Open

Changing COUPONS_COUPON_TYPES generates additional migrations #29

dmarcelino opened this issue Mar 26, 2018 · 0 comments

Comments

@dmarcelino
Copy link
Contributor

Hi,

If the setting COUPONS_COUPON_TYPES is set it will generate additional django-coupons migrations, because it's being used as an input to modelfield type in models.py#L73:

type = models.CharField(_("Type"), max_length=20, choices=COUPON_TYPES)

This is not ideal as it can break a user app if django-coupons add migrations in the future. I suggest choices are only applied to form and not the coupon model.

dmarcelino added a commit to dmarcelino/django-coupons that referenced this issue Mar 26, 2018
To avoid generating new migrations when COUPONS_COUPON_TYPES is changed.
Amurmurmur added a commit to Amurmurmur/django-coupons that referenced this issue Sep 4, 2018
Amurmurmur added a commit to Amurmurmur/django-coupons that referenced this issue Sep 5, 2018
Amurmurmur added a commit to Amurmurmur/django-coupons that referenced this issue Sep 5, 2018
digicase added a commit to digicase/django-coupons that referenced this issue Mar 11, 2020
Fixes byteweaver#29.

To avoid generating new migrations when COUPONS_COUPON_TYPES is changed, use it only to populate the coupon form.
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

No branches or pull requests

1 participant