diff --git a/netbox/extras/migrations/0093_alter_customfield_name.py b/netbox/extras/migrations/0093_alter_customfield_name.py new file mode 100644 index 000000000..dfdcd2ec3 --- /dev/null +++ b/netbox/extras/migrations/0093_alter_customfield_name.py @@ -0,0 +1,29 @@ +# Generated by Django 4.1.8 on 2023-05-08 15:57 + +import django.core.validators +from django.db import migrations, models +import re + + +class Migration(migrations.Migration): + dependencies = [ + ('extras', '0092_delete_jobresult'), + ] + + operations = [ + migrations.AlterField( + model_name='customfield', + name='name', + field=models.CharField( + max_length=50, + unique=True, + validators=[ + django.core.validators.RegexValidator( + flags=re.RegexFlag['IGNORECASE'], + message='Only alphanumeric characters and underscores (no double-underscores) are allowed.', + regex='^(?!.*__.*)^[a-z0-9_]+$', + ) + ], + ), + ), + ]