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

[Bug]: Some optional fields do not have default values causing migrations to be generated again #73

Closed
abhi1693 opened this issue Nov 4, 2022 · 0 comments · Fixed by #86
Labels
bug Something isn't working

Comments

@abhi1693
Copy link
Member

abhi1693 commented Nov 4, 2022

NetBox access-list plugin version

v1.1.0

NetBox version

v3.2.7

Steps to Reproduce

python manage.py makemigrations netbox_acls

Expected Behavior

No new migrations should be generated

Observed Behavior

It is impossible to change a nullable field 'remark' on aclextendedrule to non-nullable without providing a default. This is because the database needs something to populate existing rows.
Please select a fix:
 1) Provide a one-off default now (will be set on all existing rows with a null value for this column)
 2) Ignore for now. Existing rows that contain NULL values will have to be handled manually, for example with a RunPython or RunSQL operation.
 3) Quit and manually define a default value in models.py.
Select an option: 
It is impossible to change a nullable field 'remark' on aclstandardrule to non-nullable without providing a default. This is because the database needs something to populate existing rows.
Please select a fix:
 1) Provide a one-off default now (will be set on all existing rows with a null value for this column)
 2) Ignore for now. Existing rows that contain NULL values will have to be handled manually, for example with a RunPython or RunSQL operation.
 3) Quit and manually define a default value in models.py.
Select an option: 
@abhi1693 abhi1693 added the bug Something isn't working label Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant