dropbox / nsot

Network Source of Truth is an open source IPAM and network inventory database
https://nsot.readthedocs.io
Other
399 stars 66 forks source link

Fix for handling IPAddress defaults in migrations #237

Closed dmar42 closed 7 years ago

dmar42 commented 7 years ago

Addresses the ValueError: None does not appear to be an IPv4 or IPv6 address error which results from performing migration 0026_model_field_verbose_names.

jathanism commented 7 years ago

Just to confirm success, I was able to successfully migrate a replica of a production database with TONS of Network objects:

$ nsot-server upgrade
Operations to perform:
  Synchronize unmigrated apps: django_filters, raven_contrib_django, staticfiles, messages, smart_selects, rest_framework_swagger, django_extensions, health_check, rest_framework, custom_user
  Apply all migrations: sessions, admin, auth, contenttypes, health_check_db, nsot
Synchronizing apps without migrations:
  Creating tables...
    Running deferred SQL...
  Installing custom SQL...
Running migrations:
  Rendering model states... DONE
  Applying nsot.0026_model_field_verbose_names... OK