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
Develop 2.7 - New Connection Types #3844
Conversation
I don't think migration are supposed to be modified. |
For wireless I just added 802.11ax wherever I saw 802.11ad, and that included the migrations. I can remove those updates. |
You should not directly modify previous migrations. Instead, you should make the changes to trigger a migration and run manage.py makemigrations. |
Noob contribution on my part. I can remove, I just figured it would be needed for any where I saw similar wireless choices. How should I proceed? I guess I did not also fully understand the migrations. |
@ryanmerolle You would revert the changes to the migration files then run the python command: python manage.py makemigrations --name adescriptivename This will generate a new migration file, if required, that has the changes. |
If the migration is not quite right, you can delete the migration file and re-create it with the same command. |
Addressing three different FRs requires three different pull requests. I realize this may seem excessive, but experience has proven that trying to batch changes leads to problems and confusion.
This is generally correct. However, choice fields are a bit odd given that the resulting migration has no real effect on the underlying database scheme: it merely tracks changes to the Django model field. I have in the past merged these changes into prior migrations, but doing so takes considerable forethought and attention to detail, and I wouldn't think it fair to expect this of anyone who is not intimately familiar with NetBox's migration history. So as far as PRs are concerned, it's best to submit each with its own discrete migration. I'm happy to condense them as the opportunity arises prior to a release. @ryanmerolle I'm going to close out this PR to avoid confusion; could you please submit the changes proposed here as separate PRs? |
Fixes #3841 (PowerPort & PowerOutlet)
Fixes #3842
Fixes #3843