1- import re
1+ # Generated by Django 5.2.5 on 2025-08-18 17:15
22
33import django .core .validators
44import django .db .models .deletion
55import django .db .models .functions .text
6- import netbox_custom_objects .models
6+ import netbox .models .deletion
7+ import re
78import taggit .managers
89import utilities .json
910import utilities .validators
@@ -15,8 +16,8 @@ class Migration(migrations.Migration):
1516 initial = True
1617
1718 dependencies = [
18- (' core' , '0012_job_object_type_optional' ),
19- (' extras' , '0123_journalentry_kind_default' ),
19+ (" core" , "0018_concrete_objecttype" ),
20+ (" extras" , "0132_configcontextprofile" ),
2021 ]
2122
2223 operations = [
@@ -28,33 +29,7 @@ class Migration(migrations.Migration):
2829 "indexes" : [],
2930 "constraints" : [],
3031 },
31- bases = ("contenttypes.contenttype" ,),
32- managers = [
33- (
34- "objects" ,
35- netbox_custom_objects .models .CustomObjectObjectTypeManager (),
36- ),
37- ],
38- ),
39- migrations .CreateModel (
40- name = "CustomObject" ,
41- fields = [
42- (
43- "id" ,
44- models .BigAutoField (
45- auto_created = True , primary_key = True , serialize = False
46- ),
47- ),
48- (
49- "tags" ,
50- taggit .managers .TaggableManager (
51- through = "extras.TaggedItem" , to = "extras.Tag"
52- ),
53- ),
54- ],
55- options = {
56- "abstract" : False ,
57- },
32+ bases = ("core.objecttype" ,),
5833 ),
5934 migrations .CreateModel (
6035 name = "CustomObjectType" ,
@@ -75,8 +50,9 @@ class Migration(migrations.Migration):
7550 encoder = utilities .json .CustomFieldJSONEncoder ,
7651 ),
7752 ),
53+ ("description" , models .CharField (blank = True , max_length = 200 )),
54+ ("comments" , models .TextField (blank = True )),
7855 ("name" , models .CharField (max_length = 100 , unique = True )),
79- ("description" , models .TextField (blank = True )),
8056 ("schema" , models .JSONField (blank = True , default = dict )),
8157 ("verbose_name_plural" , models .CharField (blank = True , max_length = 100 )),
8258 (
@@ -90,6 +66,7 @@ class Migration(migrations.Migration):
9066 "verbose_name" : "Custom Object Type" ,
9167 "ordering" : ("name" ,),
9268 },
69+ bases = (netbox .models .deletion .DeleteMixin , models .Model ),
9370 ),
9471 migrations .CreateModel (
9572 name = "CustomObjectTypeField" ,
@@ -117,7 +94,7 @@ class Migration(migrations.Migration):
11794 django .core .validators .RegexValidator (
11895 flags = re .RegexFlag ["IGNORECASE" ],
11996 inverse_match = True ,
120- message = "Double underscores are not permitted in custom field names." ,
97+ message = "Double underscores are not permitted in custom object field names." ,
12198 regex = "__" ,
12299 ),
123100 ],
@@ -128,7 +105,7 @@ class Migration(migrations.Migration):
128105 ("description" , models .CharField (blank = True , max_length = 200 )),
129106 ("required" , models .BooleanField (default = False )),
130107 ("unique" , models .BooleanField (default = False )),
131- ("search_weight" , models .PositiveSmallIntegerField (default = 1000 )),
108+ ("search_weight" , models .PositiveSmallIntegerField (default = 500 )),
132109 ("filter_logic" , models .CharField (default = "loose" , max_length = 50 )),
133110 ("default" , models .JSONField (blank = True , null = True )),
134111 ("related_object_filter" , models .JSONField (blank = True , null = True )),
@@ -180,6 +157,7 @@ class Migration(migrations.Migration):
180157 "verbose_name_plural" : "custom object type fields" ,
181158 "ordering" : ["group_name" , "weight" , "name" ],
182159 },
160+ bases = (netbox .models .deletion .DeleteMixin , models .Model ),
183161 ),
184162 migrations .AddConstraint (
185163 model_name = "customobjecttype" ,
0 commit comments