2022-10-21 13:16:16 -04:00
|
|
|
import uuid
|
|
|
|
|
2022-11-15 08:34:14 -05:00
|
|
|
import django.db.models.deletion
|
2022-12-02 10:07:53 -05:00
|
|
|
import django.db.models.lookups
|
2022-11-15 08:34:14 -05:00
|
|
|
from django.db import migrations, models
|
|
|
|
|
|
|
|
|
2022-10-21 13:16:16 -04:00
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
dependencies = [
|
2022-11-15 08:34:14 -05:00
|
|
|
('circuits', '0041_standardize_description_comments'),
|
2022-10-21 13:16:16 -04:00
|
|
|
('contenttypes', '0002_remove_content_type_name'),
|
2022-11-15 08:34:14 -05:00
|
|
|
('dcim', '0166_virtualdevicecontext'),
|
|
|
|
('extras', '0082_savedfilter'),
|
|
|
|
('ipam', '0063_standardize_description_comments'),
|
|
|
|
('tenancy', '0009_standardize_description_comments'),
|
|
|
|
('virtualization', '0034_standardize_description_comments'),
|
|
|
|
('wireless', '0008_wirelesslan_status'),
|
2022-10-21 13:16:16 -04:00
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.AddField(
|
|
|
|
model_name='customfield',
|
|
|
|
name='search_weight',
|
|
|
|
field=models.PositiveSmallIntegerField(default=1000),
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='CachedValue',
|
|
|
|
fields=[
|
|
|
|
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
|
|
|
|
('timestamp', models.DateTimeField(auto_now_add=True)),
|
|
|
|
('object_id', models.PositiveBigIntegerField()),
|
|
|
|
('field', models.CharField(max_length=200)),
|
|
|
|
('type', models.CharField(max_length=30)),
|
2022-12-02 10:07:53 -05:00
|
|
|
('value', models.TextField()),
|
2022-10-21 13:16:16 -04:00
|
|
|
('weight', models.PositiveSmallIntegerField(default=1000)),
|
|
|
|
('object_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='contenttypes.contenttype')),
|
|
|
|
],
|
|
|
|
options={
|
|
|
|
'ordering': ('weight', 'object_type', 'object_id'),
|
|
|
|
},
|
|
|
|
),
|
|
|
|
]
|