From b41b4fc584f900dc0b84a92c3e6311d18c51d026 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Mon, 9 Oct 2017 13:44:22 -0400 Subject: [PATCH] Closes #1506: Extended rack facility ID field from 30 to 50 characters --- .../0046_rack_lengthen_facility_id.py | 21 +++++++++++++++++++ netbox/dcim/models.py | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 netbox/dcim/migrations/0046_rack_lengthen_facility_id.py diff --git a/netbox/dcim/migrations/0046_rack_lengthen_facility_id.py b/netbox/dcim/migrations/0046_rack_lengthen_facility_id.py new file mode 100644 index 000000000..d04006524 --- /dev/null +++ b/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'), + ), + ] diff --git a/netbox/dcim/models.py b/netbox/dcim/models.py index 6eaf4b39c..45d46d92f 100644 --- a/netbox/dcim/models.py +++ b/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)