mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-24 09:28:38 -06:00
Closes #894: Expand device name max length to 64 characters
This commit is contained in:
parent
db60e8868c
commit
cc31c8fc33
21
netbox/dcim/migrations/0032_device_increase_name_length.py
Normal file
21
netbox/dcim/migrations/0032_device_increase_name_length.py
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Generated by Django 1.10.4 on 2017-03-02 15:09
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
import utilities.fields
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('dcim', '0031_regions'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='device',
|
||||||
|
name='name',
|
||||||
|
field=utilities.fields.NullableCharField(blank=True, max_length=64, null=True, unique=True),
|
||||||
|
),
|
||||||
|
]
|
@ -915,7 +915,7 @@ class Device(CreatedUpdatedModel, CustomFieldModel):
|
|||||||
device_role = models.ForeignKey('DeviceRole', related_name='devices', on_delete=models.PROTECT)
|
device_role = models.ForeignKey('DeviceRole', related_name='devices', on_delete=models.PROTECT)
|
||||||
tenant = models.ForeignKey(Tenant, blank=True, null=True, related_name='devices', on_delete=models.PROTECT)
|
tenant = models.ForeignKey(Tenant, blank=True, null=True, related_name='devices', on_delete=models.PROTECT)
|
||||||
platform = models.ForeignKey('Platform', related_name='devices', blank=True, null=True, on_delete=models.SET_NULL)
|
platform = models.ForeignKey('Platform', related_name='devices', blank=True, null=True, on_delete=models.SET_NULL)
|
||||||
name = NullableCharField(max_length=50, blank=True, null=True, unique=True)
|
name = NullableCharField(max_length=64, blank=True, null=True, unique=True)
|
||||||
serial = models.CharField(max_length=50, blank=True, verbose_name='Serial number')
|
serial = models.CharField(max_length=50, blank=True, verbose_name='Serial number')
|
||||||
asset_tag = NullableCharField(max_length=50, blank=True, null=True, unique=True, verbose_name='Asset tag',
|
asset_tag = NullableCharField(max_length=50, blank=True, null=True, unique=True, verbose_name='Asset tag',
|
||||||
help_text='A unique tag used to identify this device')
|
help_text='A unique tag used to identify this device')
|
||||||
|
Loading…
Reference in New Issue
Block a user