Resolved migration discrepancies when dealing with NULL values

This commit is contained in:
Jeremy Stretch 2019-11-21 21:44:30 -05:00
parent 4e2863e4ec
commit 180d3d0029
5 changed files with 17 additions and 1 deletions

View File

@ -31,4 +31,9 @@ class Migration(migrations.Migration):
migrations.RunPython(
code=rack_type_to_slug
),
migrations.AlterField(
model_name='rack',
name='type',
field=models.CharField(blank=True, max_length=50),
),
]

View File

@ -26,7 +26,7 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='rack',
name='status',
field=models.CharField(blank=True, default='active', max_length=50),
field=models.CharField(default='active', max_length=50),
),
migrations.RunPython(
code=rack_status_to_slug

View File

@ -28,4 +28,9 @@ class Migration(migrations.Migration):
migrations.RunPython(
code=device_face_to_slug
),
migrations.AlterField(
model_name='device',
name='face',
field=models.CharField(blank=True, max_length=50),
),
]

View File

@ -28,4 +28,9 @@ class Migration(migrations.Migration):
migrations.RunPython(
code=devicetype_subdevicerole_to_slug
),
migrations.AlterField(
model_name='devicetype',
name='subdevice_role',
field=models.CharField(blank=True, max_length=50),
),
]

View File

@ -922,6 +922,7 @@ class DeviceType(ChangeLoggedModel, CustomFieldModel):
subdevice_role = models.CharField(
max_length=50,
choices=SubdeviceRoleChoices,
blank=True,
verbose_name='Parent/child status',
help_text='Parent devices house child devices in device bays. Leave blank '
'if this device type is neither a parent nor a child.'