Closes #5011: Standardized name field lengths across all models

This commit is contained in:
Jeremy Stretch
2020-10-15 15:37:34 -04:00
parent 8781cf1c57
commit c9c8d337a0
16 changed files with 327 additions and 28 deletions

View File

@@ -41,10 +41,11 @@ class Manufacturer(ChangeLoggedModel):
A Manufacturer represents a company which produces hardware devices; for example, Juniper or Dell.
"""
name = models.CharField(
max_length=50,
max_length=100,
unique=True
)
slug = models.SlugField(
max_length=100,
unique=True
)
description = models.CharField(
@@ -95,9 +96,11 @@ class DeviceType(ChangeLoggedModel, CustomFieldModel):
related_name='device_types'
)
model = models.CharField(
max_length=50
max_length=100
)
slug = models.SlugField(
max_length=100
)
slug = models.SlugField()
part_number = models.CharField(
max_length=50,
blank=True,
@@ -340,10 +343,11 @@ class DeviceRole(ChangeLoggedModel):
virtual machines as well.
"""
name = models.CharField(
max_length=50,
max_length=100,
unique=True
)
slug = models.SlugField(
max_length=100,
unique=True
)
color = ColorField(
@@ -390,8 +394,8 @@ class Platform(ChangeLoggedModel):
unique=True
)
slug = models.SlugField(
unique=True,
max_length=100
max_length=100,
unique=True
)
manufacturer = models.ForeignKey(
to='dcim.Manufacturer',