Browse Source

Closes #1506: Extended rack facility ID field from 30 to 50 characters

Jeremy Stretch 7 years ago
parent
commit
b41b4fc584
2 changed files with 22 additions and 1 deletions
  1. 21 0
      netbox/dcim/migrations/0046_rack_lengthen_facility_id.py
  2. 1 1
      netbox/dcim/models.py

+ 21 - 0
netbox/dcim/migrations/0046_rack_lengthen_facility_id.py

@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.4 on 2017-10-09 17:43
+from __future__ import unicode_literals
+
+from django.db import migrations
+import utilities.fields
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('dcim', '0045_devicerole_vm_role'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='rack',
+            name='facility_id',
+            field=utilities.fields.NullableCharField(blank=True, max_length=50, null=True, verbose_name='Facility ID'),
+        ),
+    ]

+ 1 - 1
netbox/dcim/models.py

@@ -217,7 +217,7 @@ class Rack(CreatedUpdatedModel, CustomFieldModel):
     Each Rack is assigned to a Site and (optionally) a RackGroup.
     """
     name = models.CharField(max_length=50)
-    facility_id = NullableCharField(max_length=30, blank=True, null=True, verbose_name='Facility ID')
+    facility_id = NullableCharField(max_length=50, blank=True, null=True, verbose_name='Facility ID')
     site = models.ForeignKey('Site', related_name='racks', on_delete=models.PROTECT)
     group = models.ForeignKey('RackGroup', related_name='racks', blank=True, null=True, on_delete=models.SET_NULL)
     tenant = models.ForeignKey(Tenant, blank=True, null=True, related_name='racks', on_delete=models.PROTECT)