django-inspectional-registration
django-inspectional-registration copied to clipboard
Additional migration created if using registration supplement
The manage.py makemigrations
command created an additional migration in the registration app. This is annoying for deploying and I'm not sure if this is the expected behavior.
Migrations for 'gtaccess':
0064_auto_20160621_1643.py:
- Create model RegistrationSupplement
Migrations for 'registration':
0002_auto_20160621_1643.py:
- Remove field registration_profile from defaultregistrationsupplement
- Delete model DefaultRegistrationSupplement
In the settings I added REGISTRATION_SUPPLEMENT_CLASS='package.to.RegistrationSupplement'
but I didn't add the registration.supplements.default
to my INSTALLED_APPS of settings.py because I thought the DefaultRegistrationSupplement
model is not nedded.
But exactly that was my problem. If I add the registration.supplements.default
to my INSTALLED_APPS the problem does not occur.
Long story short I'm happy now but as I mentioned I'm not sure if this is that expected behavior. I just want let you know about that.
By the way thanks for this excellent lib.
I'm not sure but could you try https://github.com/lambdalisue/django-inspectional-registration/tree/issue66
Please apologies for my late response.
First I had to add a dependency from migration 0002_default_supplement
to 0001_initial
migration
0002_default_supplement.py:
dependencies = [
('registration', '0001_initial'),
]
otherwise the migrate command complains about a conflict:
CommandError: Conflicting migrations detected (0002_default_supplement, 0001_initial in registration).
After that everything worked perfectly for my case.
An issue could be If someone starts without a supplement class and later he decides to use the default supplement model. It won't be generated.
Thanks. I'll fix it as your modification.
An issue could be If someone starts without a supplement class and later he decides to use the default supplement model. It won't be generated.
I think then he can use --force
option ;-)