Closes #13647: Squash all migrations prior to v3.7 (#14853)

* Regenerate pre-v3.7 migrations

* Annotate replaced migrations

* Rename dependencies; remove FeatureQuery references

* Add missed replacement
This commit is contained in:
Jeremy Stretch
2024-01-19 13:55:22 -05:00
committed by GitHub
parent ef5e10d360
commit 874685fd6f
190 changed files with 4367 additions and 9157 deletions
+453
View File
@@ -0,0 +1,453 @@
from django.conf import settings
import django.contrib.postgres.fields
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import extras.fields
import extras.models.customfields
import extras.models.mixins
import extras.utils
import re
import taggit.managers
import utilities.fields
import utilities.json
import utilities.validators
import uuid
class Migration(migrations.Migration):
initial = True
dependencies = [
('core', '0001_initial'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('contenttypes', '0002_remove_content_type_name'),
]
operations = [
migrations.CreateModel(
name='Report',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
],
options={
'managed': False,
},
),
migrations.CreateModel(
name='Script',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
],
options={
'managed': False,
},
),
migrations.CreateModel(
name='Bookmark',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
('created', models.DateTimeField(auto_now_add=True)),
('object_id', models.PositiveBigIntegerField()),
],
options={
'verbose_name': 'bookmark',
'verbose_name_plural': 'bookmarks',
'ordering': ('created', 'pk'),
},
),
migrations.CreateModel(
name='Branch',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
('created', models.DateTimeField(auto_now_add=True, null=True)),
('last_updated', models.DateTimeField(auto_now=True, null=True)),
('name', models.CharField(max_length=100, unique=True)),
('description', models.CharField(blank=True, max_length=200)),
],
options={
'verbose_name': 'branch',
'verbose_name_plural': 'branches',
'ordering': ('name',),
},
),
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)),
('value', extras.fields.CachedValueField()),
('weight', models.PositiveSmallIntegerField(default=1000)),
],
options={
'verbose_name': 'cached value',
'verbose_name_plural': 'cached values',
'ordering': ('weight', 'object_type', 'object_id'),
},
),
migrations.CreateModel(
name='ConfigContext',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
('created', models.DateTimeField(auto_now_add=True, null=True)),
('last_updated', models.DateTimeField(auto_now=True, null=True)),
('data_path', models.CharField(blank=True, editable=False, max_length=1000)),
('auto_sync_enabled', models.BooleanField(default=False)),
('data_synced', models.DateTimeField(blank=True, editable=False, null=True)),
('name', models.CharField(max_length=100, unique=True)),
('weight', models.PositiveSmallIntegerField(default=1000)),
('description', models.CharField(blank=True, max_length=200)),
('is_active', models.BooleanField(default=True)),
('data', models.JSONField()),
],
options={
'verbose_name': 'config context',
'verbose_name_plural': 'config contexts',
'ordering': ['weight', 'name'],
},
),
migrations.CreateModel(
name='ConfigRevision',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
('created', models.DateTimeField(auto_now_add=True)),
('comment', models.CharField(blank=True, max_length=200)),
('data', models.JSONField(blank=True, null=True)),
],
options={
'verbose_name': 'config revision',
'verbose_name_plural': 'config revisions',
'ordering': ['-created'],
},
),
migrations.CreateModel(
name='CustomFieldChoiceSet',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
('created', models.DateTimeField(auto_now_add=True, null=True)),
('last_updated', models.DateTimeField(auto_now=True, null=True)),
('name', models.CharField(max_length=100, unique=True)),
('description', models.CharField(blank=True, max_length=200)),
('base_choices', models.CharField(blank=True, max_length=50)),
('extra_choices', django.contrib.postgres.fields.ArrayField(base_field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=100), size=2), blank=True, null=True, size=None)),
('order_alphabetically', models.BooleanField(default=False)),
],
options={
'verbose_name': 'custom field choice set',
'verbose_name_plural': 'custom field choice sets',
'ordering': ('name',),
},
),
migrations.CreateModel(
name='Tag',
fields=[
('name', models.CharField(max_length=100, unique=True)),
('slug', models.SlugField(allow_unicode=True, max_length=100, unique=True)),
('created', models.DateTimeField(auto_now_add=True, null=True)),
('last_updated', models.DateTimeField(auto_now=True, null=True)),
('id', models.BigAutoField(primary_key=True, serialize=False)),
('color', utilities.fields.ColorField(default='9e9e9e', max_length=6)),
('description', models.CharField(blank=True, max_length=200)),
('object_types', models.ManyToManyField(blank=True, related_name='+', to='contenttypes.contenttype')),
],
options={
'verbose_name': 'tag',
'verbose_name_plural': 'tags',
'ordering': ['name'],
},
),
migrations.CreateModel(
name='TaggedItem',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
('object_id', models.IntegerField(db_index=True)),
('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_tagged_items', to='contenttypes.contenttype')),
('tag', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_items', to='extras.tag')),
],
options={
'verbose_name': 'tagged item',
'verbose_name_plural': 'tagged items',
},
),
migrations.CreateModel(
name='ReportModule',
fields=[
],
options={
'verbose_name': 'report module',
'verbose_name_plural': 'report modules',
'proxy': True,
'indexes': [],
'constraints': [],
},
bases=(extras.models.mixins.PythonModuleMixin, 'core.managedfile', models.Model),
),
migrations.CreateModel(
name='ScriptModule',
fields=[
],
options={
'verbose_name': 'script module',
'verbose_name_plural': 'script modules',
'proxy': True,
'indexes': [],
'constraints': [],
},
bases=(extras.models.mixins.PythonModuleMixin, 'core.managedfile', models.Model),
),
migrations.CreateModel(
name='Webhook',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
('created', models.DateTimeField(auto_now_add=True, null=True)),
('last_updated', models.DateTimeField(auto_now=True, null=True)),
('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
('name', models.CharField(max_length=150, unique=True)),
('type_create', models.BooleanField(default=False)),
('type_update', models.BooleanField(default=False)),
('type_delete', models.BooleanField(default=False)),
('type_job_start', models.BooleanField(default=False)),
('type_job_end', models.BooleanField(default=False)),
('payload_url', models.CharField(max_length=500)),
('enabled', models.BooleanField(default=True)),
('http_method', models.CharField(default='POST', max_length=30)),
('http_content_type', models.CharField(default='application/json', max_length=100)),
('additional_headers', models.TextField(blank=True)),
('body_template', models.TextField(blank=True)),
('secret', models.CharField(blank=True, max_length=255)),
('conditions', models.JSONField(blank=True, null=True)),
('ssl_verification', models.BooleanField(default=True)),
('ca_file_path', models.CharField(blank=True, max_length=4096, null=True)),
('content_types', models.ManyToManyField(related_name='webhooks', to='contenttypes.contenttype')),
('tags', taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag')),
],
options={
'verbose_name': 'webhook',
'verbose_name_plural': 'webhooks',
'ordering': ('name',),
},
),
migrations.CreateModel(
name='StagedChange',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
('created', models.DateTimeField(auto_now_add=True, null=True)),
('last_updated', models.DateTimeField(auto_now=True, null=True)),
('action', models.CharField(max_length=20)),
('object_id', models.PositiveBigIntegerField(blank=True, null=True)),
('data', models.JSONField(blank=True, null=True)),
('branch', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='staged_changes', to='extras.branch')),
('object_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='contenttypes.contenttype')),
],
options={
'verbose_name': 'staged change',
'verbose_name_plural': 'staged changes',
'ordering': ('pk',),
},
),
migrations.CreateModel(
name='SavedFilter',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
('created', models.DateTimeField(auto_now_add=True, null=True)),
('last_updated', models.DateTimeField(auto_now=True, null=True)),
('name', models.CharField(max_length=100, unique=True)),
('slug', models.SlugField(max_length=100, unique=True)),
('description', models.CharField(blank=True, max_length=200)),
('weight', models.PositiveSmallIntegerField(default=100)),
('enabled', models.BooleanField(default=True)),
('shared', models.BooleanField(default=True)),
('parameters', models.JSONField()),
('content_types', models.ManyToManyField(related_name='saved_filters', to='contenttypes.contenttype')),
('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name': 'saved filter',
'verbose_name_plural': 'saved filters',
'ordering': ('weight', 'name'),
},
),
migrations.CreateModel(
name='ObjectChange',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
('time', models.DateTimeField(auto_now_add=True, db_index=True)),
('user_name', models.CharField(editable=False, max_length=150)),
('request_id', models.UUIDField(db_index=True, editable=False)),
('action', models.CharField(max_length=50)),
('changed_object_id', models.PositiveBigIntegerField()),
('related_object_id', models.PositiveBigIntegerField(blank=True, null=True)),
('object_repr', models.CharField(editable=False, max_length=200)),
('prechange_data', models.JSONField(blank=True, editable=False, null=True)),
('postchange_data', models.JSONField(blank=True, editable=False, null=True)),
('changed_object_type', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='+', to='contenttypes.contenttype')),
('related_object_type', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='contenttypes.contenttype')),
('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='changes', to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name': 'object change',
'verbose_name_plural': 'object changes',
'ordering': ['-time'],
},
),
migrations.CreateModel(
name='JournalEntry',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
('created', models.DateTimeField(auto_now_add=True, null=True)),
('last_updated', models.DateTimeField(auto_now=True, null=True)),
('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
('assigned_object_id', models.PositiveBigIntegerField()),
('kind', models.CharField(default='info', max_length=30)),
('comments', models.TextField()),
('assigned_object_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.contenttype')),
('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
('tags', taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag')),
],
options={
'verbose_name': 'journal entry',
'verbose_name_plural': 'journal entries',
'ordering': ('-created',),
},
),
migrations.CreateModel(
name='ImageAttachment',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
('created', models.DateTimeField(auto_now_add=True, null=True)),
('last_updated', models.DateTimeField(auto_now=True, null=True)),
('object_id', models.PositiveBigIntegerField()),
('image', models.ImageField(height_field='image_height', upload_to=extras.utils.image_upload, width_field='image_width')),
('image_height', models.PositiveSmallIntegerField()),
('image_width', models.PositiveSmallIntegerField()),
('name', models.CharField(blank=True, max_length=50)),
('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.contenttype')),
],
options={
'verbose_name': 'image attachment',
'verbose_name_plural': 'image attachments',
'ordering': ('name', 'pk'),
},
),
migrations.CreateModel(
name='ExportTemplate',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
('created', models.DateTimeField(auto_now_add=True, null=True)),
('last_updated', models.DateTimeField(auto_now=True, null=True)),
('data_path', models.CharField(blank=True, editable=False, max_length=1000)),
('auto_sync_enabled', models.BooleanField(default=False)),
('data_synced', models.DateTimeField(blank=True, editable=False, null=True)),
('name', models.CharField(max_length=100)),
('description', models.CharField(blank=True, max_length=200)),
('template_code', models.TextField()),
('mime_type', models.CharField(blank=True, max_length=50)),
('file_extension', models.CharField(blank=True, max_length=15)),
('as_attachment', models.BooleanField(default=True)),
('content_types', models.ManyToManyField(related_name='export_templates', to='contenttypes.contenttype')),
('data_file', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='core.datafile')),
('data_source', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='core.datasource')),
],
options={
'verbose_name': 'export template',
'verbose_name_plural': 'export templates',
'ordering': ('name',),
},
),
migrations.CreateModel(
name='Dashboard',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
('layout', models.JSONField(default=list)),
('config', models.JSONField(default=dict)),
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='dashboard', to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name': 'dashboard',
'verbose_name_plural': 'dashboards',
},
),
migrations.CreateModel(
name='CustomLink',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
('created', models.DateTimeField(auto_now_add=True, null=True)),
('last_updated', models.DateTimeField(auto_now=True, null=True)),
('name', models.CharField(max_length=100, unique=True)),
('enabled', models.BooleanField(default=True)),
('link_text', models.TextField()),
('link_url', models.TextField()),
('weight', models.PositiveSmallIntegerField(default=100)),
('group_name', models.CharField(blank=True, max_length=50)),
('button_class', models.CharField(default='outline-dark', max_length=30)),
('new_window', models.BooleanField(default=False)),
('content_types', models.ManyToManyField(related_name='custom_links', to='contenttypes.contenttype')),
],
options={
'verbose_name': 'custom link',
'verbose_name_plural': 'custom links',
'ordering': ['group_name', 'weight', 'name'],
},
),
migrations.CreateModel(
name='CustomField',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
('created', models.DateTimeField(auto_now_add=True, null=True)),
('last_updated', models.DateTimeField(auto_now=True, null=True)),
('type', models.CharField(default='text', max_length=50)),
('name', models.CharField(max_length=50, unique=True, validators=[django.core.validators.RegexValidator(flags=re.RegexFlag['IGNORECASE'], message='Only alphanumeric characters and underscores are allowed.', regex='^[a-z0-9_]+$'), django.core.validators.RegexValidator(flags=re.RegexFlag['IGNORECASE'], inverse_match=True, message='Double underscores are not permitted in custom field names.', regex='__')])),
('label', models.CharField(blank=True, max_length=50)),
('group_name', models.CharField(blank=True, max_length=50)),
('description', models.CharField(blank=True, max_length=200)),
('required', models.BooleanField(default=False)),
('search_weight', models.PositiveSmallIntegerField(default=1000)),
('filter_logic', models.CharField(default='loose', max_length=50)),
('default', models.JSONField(blank=True, null=True)),
('weight', models.PositiveSmallIntegerField(default=100)),
('validation_minimum', models.IntegerField(blank=True, null=True)),
('validation_maximum', models.IntegerField(blank=True, null=True)),
('validation_regex', models.CharField(blank=True, max_length=500, validators=[utilities.validators.validate_regex])),
('ui_visibility', models.CharField(default='read-write', max_length=50)),
('is_cloneable', models.BooleanField(default=False)),
('choice_set', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='choices_for', to='extras.customfieldchoiceset')),
('content_types', models.ManyToManyField(related_name='custom_fields', to='contenttypes.contenttype')),
('object_type', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='contenttypes.contenttype')),
],
options={
'verbose_name': 'custom field',
'verbose_name_plural': 'custom fields',
'ordering': ['group_name', 'weight', 'name'],
},
managers=[
('objects', extras.models.customfields.CustomFieldManager()),
],
),
migrations.CreateModel(
name='ConfigTemplate',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
('created', models.DateTimeField(auto_now_add=True, null=True)),
('last_updated', models.DateTimeField(auto_now=True, null=True)),
('data_path', models.CharField(blank=True, editable=False, max_length=1000)),
('auto_sync_enabled', models.BooleanField(default=False)),
('data_synced', models.DateTimeField(blank=True, editable=False, null=True)),
('name', models.CharField(max_length=100)),
('description', models.CharField(blank=True, max_length=200)),
('template_code', models.TextField()),
('environment_params', models.JSONField(blank=True, default=dict, null=True)),
('data_file', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='core.datafile')),
('data_source', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='core.datasource')),
('tags', taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag')),
],
options={
'verbose_name': 'config template',
'verbose_name_plural': 'config templates',
'ordering': ('name',),
},
),
]
-235
View File
@@ -1,235 +0,0 @@
from django.conf import settings
import django.contrib.postgres.fields
from django.db import migrations, models
import django.db.models.deletion
import extras.models.customfields
import extras.utils
import utilities.fields
import utilities.validators
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('contenttypes', '0002_remove_content_type_name'),
]
replaces = [
('extras', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Report',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False)),
],
options={
'managed': False,
},
),
migrations.CreateModel(
name='Script',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False)),
],
options={
'managed': False,
},
),
migrations.CreateModel(
name='ConfigContext',
fields=[
('created', models.DateField(auto_now_add=True, null=True)),
('last_updated', models.DateTimeField(auto_now=True, null=True)),
('id', models.BigAutoField(primary_key=True, serialize=False)),
('name', models.CharField(max_length=100, unique=True)),
('weight', models.PositiveSmallIntegerField(default=1000)),
('description', models.CharField(blank=True, max_length=200)),
('is_active', models.BooleanField(default=True)),
('data', models.JSONField()),
],
options={
'ordering': ['weight', 'name'],
},
),
migrations.CreateModel(
name='Tag',
fields=[
('name', models.CharField(max_length=100, unique=True)),
('slug', models.SlugField(max_length=100, unique=True)),
('created', models.DateField(auto_now_add=True, null=True)),
('last_updated', models.DateTimeField(auto_now=True, null=True)),
('id', models.BigAutoField(primary_key=True, serialize=False)),
('color', utilities.fields.ColorField(default='9e9e9e', max_length=6)),
('description', models.CharField(blank=True, max_length=200)),
],
options={
'ordering': ['name'],
},
),
migrations.CreateModel(
name='Webhook',
fields=[
('id', models.BigAutoField(primary_key=True, serialize=False)),
('name', models.CharField(max_length=150, unique=True)),
('type_create', models.BooleanField(default=False)),
('type_update', models.BooleanField(default=False)),
('type_delete', models.BooleanField(default=False)),
('payload_url', models.CharField(max_length=500)),
('enabled', models.BooleanField(default=True)),
('http_method', models.CharField(default='POST', max_length=30)),
('http_content_type', models.CharField(default='application/json', max_length=100)),
('additional_headers', models.TextField(blank=True)),
('body_template', models.TextField(blank=True)),
('secret', models.CharField(blank=True, max_length=255)),
('ssl_verification', models.BooleanField(default=True)),
('ca_file_path', models.CharField(blank=True, max_length=4096, null=True)),
('content_types', models.ManyToManyField(related_name='webhooks', to='contenttypes.ContentType')),
],
options={
'ordering': ('name',),
},
),
migrations.CreateModel(
name='TaggedItem',
fields=[
('object_id', models.IntegerField(db_index=True)),
('id', models.BigAutoField(primary_key=True, serialize=False)),
('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_tagged_items', to='contenttypes.contenttype')),
('tag', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_items', to='extras.tag')),
],
),
migrations.CreateModel(
name='ObjectChange',
fields=[
('id', models.BigAutoField(primary_key=True, serialize=False)),
('time', models.DateTimeField(auto_now_add=True, db_index=True)),
('user_name', models.CharField(editable=False, max_length=150)),
('request_id', models.UUIDField(editable=False)),
('action', models.CharField(max_length=50)),
('changed_object_id', models.PositiveIntegerField()),
('related_object_id', models.PositiveIntegerField(blank=True, null=True)),
('object_repr', models.CharField(editable=False, max_length=200)),
('prechange_data', models.JSONField(blank=True, editable=False, null=True)),
('postchange_data', models.JSONField(blank=True, editable=False, null=True)),
('changed_object_type', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='+', to='contenttypes.contenttype')),
('related_object_type', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='contenttypes.contenttype')),
('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='changes', to=settings.AUTH_USER_MODEL)),
],
options={
'ordering': ['-time'],
},
),
migrations.CreateModel(
name='JournalEntry',
fields=[
('last_updated', models.DateTimeField(auto_now=True, null=True)),
('id', models.BigAutoField(primary_key=True, serialize=False)),
('assigned_object_id', models.PositiveIntegerField()),
('created', models.DateTimeField(auto_now_add=True)),
('kind', models.CharField(default='info', max_length=30)),
('comments', models.TextField()),
('assigned_object_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.contenttype')),
('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name_plural': 'journal entries',
'ordering': ('-created',),
},
),
migrations.CreateModel(
name='JobResult',
fields=[
('id', models.BigAutoField(primary_key=True, serialize=False)),
('name', models.CharField(max_length=255)),
('created', models.DateTimeField(auto_now_add=True)),
('completed', models.DateTimeField(blank=True, null=True)),
('status', models.CharField(default='pending', max_length=30)),
('data', models.JSONField(blank=True, null=True)),
('job_id', models.UUIDField(unique=True)),
('obj_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='job_results', to='contenttypes.contenttype')),
('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
],
options={
'ordering': ['obj_type', 'name', '-created'],
},
),
migrations.CreateModel(
name='ImageAttachment',
fields=[
('id', models.BigAutoField(primary_key=True, serialize=False)),
('object_id', models.PositiveIntegerField()),
('image', models.ImageField(height_field='image_height', upload_to=extras.utils.image_upload, width_field='image_width')),
('image_height', models.PositiveSmallIntegerField()),
('image_width', models.PositiveSmallIntegerField()),
('name', models.CharField(blank=True, max_length=50)),
('created', models.DateTimeField(auto_now_add=True)),
('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.contenttype')),
],
options={
'ordering': ('name', 'pk'),
},
),
migrations.CreateModel(
name='ExportTemplate',
fields=[
('id', models.BigAutoField(primary_key=True, serialize=False)),
('name', models.CharField(max_length=100)),
('description', models.CharField(blank=True, max_length=200)),
('template_code', models.TextField()),
('mime_type', models.CharField(blank=True, max_length=50)),
('file_extension', models.CharField(blank=True, max_length=15)),
('as_attachment', models.BooleanField(default=True)),
('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.contenttype')),
],
options={
'ordering': ['content_type', 'name'],
},
),
migrations.CreateModel(
name='CustomLink',
fields=[
('id', models.BigAutoField(primary_key=True, serialize=False)),
('name', models.CharField(max_length=100, unique=True)),
('link_text', models.CharField(max_length=500)),
('link_url', models.CharField(max_length=500)),
('weight', models.PositiveSmallIntegerField(default=100)),
('group_name', models.CharField(blank=True, max_length=50)),
('button_class', models.CharField(default='default', max_length=30)),
('new_window', models.BooleanField(default=False)),
('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.contenttype')),
],
options={
'ordering': ['group_name', 'weight', 'name'],
},
),
migrations.CreateModel(
name='CustomField',
fields=[
('id', models.BigAutoField(primary_key=True, serialize=False)),
('type', models.CharField(default='text', max_length=50)),
('name', models.CharField(max_length=50, unique=True)),
('label', models.CharField(blank=True, max_length=50)),
('description', models.CharField(blank=True, max_length=200)),
('required', models.BooleanField(default=False)),
('filter_logic', models.CharField(default='loose', max_length=50)),
('default', models.JSONField(blank=True, null=True)),
('weight', models.PositiveSmallIntegerField(default=100)),
('validation_minimum', models.PositiveIntegerField(blank=True, null=True)),
('validation_maximum', models.PositiveIntegerField(blank=True, null=True)),
('validation_regex', models.CharField(blank=True, max_length=500, validators=[utilities.validators.validate_regex])),
('choices', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=100), blank=True, null=True, size=None)),
('content_types', models.ManyToManyField(related_name='custom_fields', to='contenttypes.ContentType')),
],
options={
'ordering': ['weight', 'name'],
},
managers=[
('objects', extras.models.customfields.CustomFieldManager()),
],
),
]
+228
View File
@@ -0,0 +1,228 @@
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('core', '0002_squashed'),
('extras', '0001_initial'),
('virtualization', '0001_initial'),
('contenttypes', '0002_remove_content_type_name'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('dcim', '0003_squashed'),
('tenancy', '0001_initial'),
]
replaces = [
('extras', '0002_custom_fields'),
('extras', '0003_exporttemplate_add_description'),
('extras', '0004_topologymap_change_comma_to_semicolon'),
('extras', '0005_useraction_add_bulk_create'),
('extras', '0006_add_imageattachments'),
('extras', '0007_unicode_literals'),
('extras', '0008_reports'),
('extras', '0009_topologymap_type'),
('extras', '0010_customfield_filter_logic'),
('extras', '0011_django2'),
('extras', '0012_webhooks'),
('extras', '0013_objectchange'),
('extras', '0014_configcontexts'),
('extras', '0015_remove_useraction'),
('extras', '0016_exporttemplate_add_cable'),
('extras', '0017_exporttemplate_mime_type_length'),
('extras', '0018_exporttemplate_add_jinja2'),
('extras', '0019_tag_taggeditem'),
('extras', '0020_tag_data'),
('extras', '0021_add_color_comments_changelog_to_tag'),
('extras', '0022_custom_links'),
('extras', '0023_fix_tag_sequences'),
('extras', '0024_scripts'),
('extras', '0025_objectchange_time_index'),
('extras', '0026_webhook_ca_file_path'),
('extras', '0027_webhook_additional_headers'),
('extras', '0028_remove_topology_maps'),
('extras', '0029_3569_customfield_fields'),
('extras', '0030_3569_objectchange_fields'),
('extras', '0031_3569_exporttemplate_fields'),
('extras', '0032_3569_webhook_fields'),
('extras', '0033_graph_type_template_language'),
('extras', '0034_configcontext_tags'),
('extras', '0035_deterministic_ordering'),
('extras', '0036_contenttype_filters_to_q_objects'),
('extras', '0037_configcontexts_clusters'),
('extras', '0038_webhook_template_support'),
('extras', '0039_update_features_content_types'),
('extras', '0040_standardize_description'),
('extras', '0041_tag_description'),
('extras', '0042_customfield_manager'),
('extras', '0043_report'),
('extras', '0044_jobresult'),
('extras', '0045_configcontext_changelog'),
('extras', '0046_update_jsonfield'),
('extras', '0047_tag_ordering'),
('extras', '0048_exporttemplate_remove_template_language'),
('extras', '0049_remove_graph'),
('extras', '0050_customfield_changes'),
('extras', '0051_migrate_customfields'),
('extras', '0052_customfield_cleanup'),
('extras', '0053_rename_webhook_obj_type'),
('extras', '0054_standardize_models'),
('extras', '0055_objectchange_data'),
('extras', '0056_extend_configcontext'),
('extras', '0057_customlink_rename_fields'),
('extras', '0058_journalentry'),
('extras', '0059_exporttemplate_as_attachment'),
('extras', '0060_customlink_button_class'),
('extras', '0061_extras_change_logging'),
('extras', '0062_clear_secrets_changelog'),
('extras', '0063_webhook_conditions'),
('extras', '0064_configrevision'),
('extras', '0065_imageattachment_change_logging'),
('extras', '0066_customfield_name_validation'),
('extras', '0067_customfield_min_max_values'),
('extras', '0068_configcontext_cluster_types'),
('extras', '0069_custom_object_field'),
('extras', '0070_customlink_enabled'),
('extras', '0071_standardize_id_fields'),
('extras', '0072_created_datetimefield'),
('extras', '0073_journalentry_tags_custom_fields'),
('extras', '0074_customfield_extensions'),
('extras', '0075_configcontext_locations'),
('extras', '0076_tag_slug_unicode'),
('extras', '0077_customlink_extend_text_and_url'),
('extras', '0078_unique_constraints'),
('extras', '0079_scheduled_jobs'),
('extras', '0080_customlink_content_types'),
('extras', '0081_exporttemplate_content_types'),
('extras', '0082_savedfilter'),
('extras', '0083_search'),
('extras', '0084_staging'),
('extras', '0085_synced_data'),
('extras', '0086_configtemplate'),
('extras', '0087_dashboard'),
('extras', '0088_jobresult_webhooks'),
('extras', '0089_customfield_is_cloneable'),
('extras', '0090_objectchange_index_request_id'),
('extras', '0091_create_managedfiles'),
('extras', '0092_delete_jobresult'),
('extras', '0093_configrevision_ordering'),
('extras', '0094_tag_object_types'),
('extras', '0095_bookmarks'),
('extras', '0096_customfieldchoiceset'),
('extras', '0097_customfield_remove_choices'),
('extras', '0098_webhook_custom_field_data_webhook_tags'),
]
operations = [
migrations.AddField(
model_name='configcontext',
name='cluster_groups',
field=models.ManyToManyField(blank=True, related_name='+', to='virtualization.clustergroup'),
),
migrations.AddField(
model_name='configcontext',
name='cluster_types',
field=models.ManyToManyField(blank=True, related_name='+', to='virtualization.clustertype'),
),
migrations.AddField(
model_name='configcontext',
name='clusters',
field=models.ManyToManyField(blank=True, related_name='+', to='virtualization.cluster'),
),
migrations.AddField(
model_name='configcontext',
name='data_file',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='core.datafile'),
),
migrations.AddField(
model_name='configcontext',
name='data_source',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='core.datasource'),
),
migrations.AddField(
model_name='configcontext',
name='device_types',
field=models.ManyToManyField(blank=True, related_name='+', to='dcim.devicetype'),
),
migrations.AddField(
model_name='configcontext',
name='locations',
field=models.ManyToManyField(blank=True, related_name='+', to='dcim.location'),
),
migrations.AddField(
model_name='configcontext',
name='platforms',
field=models.ManyToManyField(blank=True, related_name='+', to='dcim.platform'),
),
migrations.AddField(
model_name='configcontext',
name='regions',
field=models.ManyToManyField(blank=True, related_name='+', to='dcim.region'),
),
migrations.AddField(
model_name='configcontext',
name='roles',
field=models.ManyToManyField(blank=True, related_name='+', to='dcim.devicerole'),
),
migrations.AddField(
model_name='configcontext',
name='site_groups',
field=models.ManyToManyField(blank=True, related_name='+', to='dcim.sitegroup'),
),
migrations.AddField(
model_name='configcontext',
name='sites',
field=models.ManyToManyField(blank=True, related_name='+', to='dcim.site'),
),
migrations.AddField(
model_name='configcontext',
name='tags',
field=models.ManyToManyField(blank=True, related_name='+', to='extras.tag'),
),
migrations.AddField(
model_name='configcontext',
name='tenant_groups',
field=models.ManyToManyField(blank=True, related_name='+', to='tenancy.tenantgroup'),
),
migrations.AddField(
model_name='configcontext',
name='tenants',
field=models.ManyToManyField(blank=True, related_name='+', to='tenancy.tenant'),
),
migrations.AddField(
model_name='cachedvalue',
name='object_type',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='contenttypes.contenttype'),
),
migrations.AddField(
model_name='branch',
name='user',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL),
),
migrations.AddField(
model_name='bookmark',
name='object_type',
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='contenttypes.contenttype'),
),
migrations.AddField(
model_name='bookmark',
name='user',
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL),
),
migrations.AddConstraint(
model_name='webhook',
constraint=models.UniqueConstraint(fields=('payload_url', 'type_create', 'type_update', 'type_delete'), name='extras_webhook_unique_payload_url_types'),
),
migrations.AddIndex(
model_name='taggeditem',
index=models.Index(fields=['content_type', 'object_id'], name='extras_tagg_content_717743_idx'),
),
migrations.AddConstraint(
model_name='bookmark',
constraint=models.UniqueConstraint(fields=('object_type', 'object_id', 'user'), name='extras_bookmark_unique_per_object_and_user'),
),
]
@@ -1,142 +0,0 @@
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dcim', '0002_auto_20160622_1821'),
('extras', '0001_initial'),
('virtualization', '0001_virtualization'),
('tenancy', '0001_initial'),
]
replaces = [
('extras', '0002_custom_fields'),
('extras', '0003_exporttemplate_add_description'),
('extras', '0004_topologymap_change_comma_to_semicolon'),
('extras', '0005_useraction_add_bulk_create'),
('extras', '0006_add_imageattachments'),
('extras', '0007_unicode_literals'),
('extras', '0008_reports'),
('extras', '0009_topologymap_type'),
('extras', '0010_customfield_filter_logic'),
('extras', '0011_django2'),
('extras', '0012_webhooks'),
('extras', '0013_objectchange'),
('extras', '0014_configcontexts'),
('extras', '0015_remove_useraction'),
('extras', '0016_exporttemplate_add_cable'),
('extras', '0017_exporttemplate_mime_type_length'),
('extras', '0018_exporttemplate_add_jinja2'),
('extras', '0019_tag_taggeditem'),
('extras', '0020_tag_data'),
('extras', '0021_add_color_comments_changelog_to_tag'),
('extras', '0022_custom_links'),
('extras', '0023_fix_tag_sequences'),
('extras', '0024_scripts'),
('extras', '0025_objectchange_time_index'),
('extras', '0026_webhook_ca_file_path'),
('extras', '0027_webhook_additional_headers'),
('extras', '0028_remove_topology_maps'),
('extras', '0029_3569_customfield_fields'),
('extras', '0030_3569_objectchange_fields'),
('extras', '0031_3569_exporttemplate_fields'),
('extras', '0032_3569_webhook_fields'),
('extras', '0033_graph_type_template_language'),
('extras', '0034_configcontext_tags'),
('extras', '0035_deterministic_ordering'),
('extras', '0036_contenttype_filters_to_q_objects'),
('extras', '0037_configcontexts_clusters'),
('extras', '0038_webhook_template_support'),
('extras', '0039_update_features_content_types'),
('extras', '0040_standardize_description'),
('extras', '0041_tag_description'),
('extras', '0042_customfield_manager'),
('extras', '0043_report'),
('extras', '0044_jobresult'),
('extras', '0045_configcontext_changelog'),
('extras', '0046_update_jsonfield'),
('extras', '0047_tag_ordering'),
('extras', '0048_exporttemplate_remove_template_language'),
('extras', '0049_remove_graph'),
('extras', '0050_customfield_changes'),
('extras', '0051_migrate_customfields'),
('extras', '0052_customfield_cleanup'),
('extras', '0053_rename_webhook_obj_type'),
('extras', '0054_standardize_models'),
('extras', '0055_objectchange_data'),
('extras', '0056_extend_configcontext'),
('extras', '0057_customlink_rename_fields'),
('extras', '0058_journalentry'),
('extras', '0059_exporttemplate_as_attachment'),
]
operations = [
migrations.AddField(
model_name='configcontext',
name='cluster_groups',
field=models.ManyToManyField(blank=True, related_name='+', to='virtualization.ClusterGroup'),
),
migrations.AddField(
model_name='configcontext',
name='clusters',
field=models.ManyToManyField(blank=True, related_name='+', to='virtualization.Cluster'),
),
migrations.AddField(
model_name='configcontext',
name='device_types',
field=models.ManyToManyField(blank=True, related_name='+', to='dcim.DeviceType'),
),
migrations.AddField(
model_name='configcontext',
name='platforms',
field=models.ManyToManyField(blank=True, related_name='+', to='dcim.Platform'),
),
migrations.AddField(
model_name='configcontext',
name='regions',
field=models.ManyToManyField(blank=True, related_name='+', to='dcim.Region'),
),
migrations.AddField(
model_name='configcontext',
name='roles',
field=models.ManyToManyField(blank=True, related_name='+', to='dcim.DeviceRole'),
),
migrations.AddField(
model_name='configcontext',
name='site_groups',
field=models.ManyToManyField(blank=True, related_name='+', to='dcim.SiteGroup'),
),
migrations.AddField(
model_name='configcontext',
name='sites',
field=models.ManyToManyField(blank=True, related_name='+', to='dcim.Site'),
),
migrations.AddField(
model_name='configcontext',
name='tags',
field=models.ManyToManyField(blank=True, related_name='+', to='extras.Tag'),
),
migrations.AddField(
model_name='configcontext',
name='tenant_groups',
field=models.ManyToManyField(blank=True, related_name='+', to='tenancy.TenantGroup'),
),
migrations.AddField(
model_name='configcontext',
name='tenants',
field=models.ManyToManyField(blank=True, related_name='+', to='tenancy.Tenant'),
),
migrations.AlterUniqueTogether(
name='webhook',
unique_together={('payload_url', 'type_create', 'type_update', 'type_delete')},
),
migrations.AlterIndexTogether(
name='taggeditem',
index_together={('content_type', 'object_id')},
),
migrations.AlterUniqueTogether(
name='exporttemplate',
unique_together={('content_type', 'name')},
),
]
@@ -1,16 +0,0 @@
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('extras', '0059_exporttemplate_as_attachment'),
]
operations = [
migrations.AlterField(
model_name='customlink',
name='button_class',
field=models.CharField(default='outline-dark', max_length=30),
),
]
@@ -1,51 +0,0 @@
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('extras', '0060_customlink_button_class'),
]
operations = [
migrations.AddField(
model_name='customfield',
name='created',
field=models.DateField(auto_now_add=True, null=True),
),
migrations.AddField(
model_name='customfield',
name='last_updated',
field=models.DateTimeField(auto_now=True, null=True),
),
migrations.AddField(
model_name='customlink',
name='created',
field=models.DateField(auto_now_add=True, null=True),
),
migrations.AddField(
model_name='customlink',
name='last_updated',
field=models.DateTimeField(auto_now=True, null=True),
),
migrations.AddField(
model_name='exporttemplate',
name='created',
field=models.DateField(auto_now_add=True, null=True),
),
migrations.AddField(
model_name='exporttemplate',
name='last_updated',
field=models.DateTimeField(auto_now=True, null=True),
),
migrations.AddField(
model_name='webhook',
name='created',
field=models.DateField(auto_now_add=True, null=True),
),
migrations.AddField(
model_name='webhook',
name='last_updated',
field=models.DateTimeField(auto_now=True, null=True),
),
]
@@ -1,26 +0,0 @@
from django.db import migrations
def clear_secrets_changelog(apps, schema_editor):
"""
Delete all ObjectChange records referencing a model within the old secrets app (pre-v3.0).
"""
ContentType = apps.get_model('contenttypes', 'ContentType')
ObjectChange = apps.get_model('extras', 'ObjectChange')
content_type_ids = ContentType.objects.filter(app_label='secrets').values_list('id', flat=True)
ObjectChange.objects.filter(changed_object_type__in=content_type_ids).delete()
class Migration(migrations.Migration):
dependencies = [
('extras', '0061_extras_change_logging'),
]
operations = [
migrations.RunPython(
code=clear_secrets_changelog,
reverse_code=migrations.RunPython.noop
),
]
@@ -1,18 +0,0 @@
# Generated by Django 3.2.8 on 2021-10-22 20:37
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('extras', '0062_clear_secrets_changelog'),
]
operations = [
migrations.AddField(
model_name='webhook',
name='conditions',
field=models.JSONField(blank=True, null=True),
),
]
@@ -1,20 +0,0 @@
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('extras', '0063_webhook_conditions'),
]
operations = [
migrations.CreateModel(
name='ConfigRevision',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False)),
('created', models.DateTimeField(auto_now_add=True)),
('comment', models.CharField(blank=True, max_length=200)),
('data', models.JSONField(blank=True, null=True)),
],
),
]
@@ -1,16 +0,0 @@
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('extras', '0064_configrevision'),
]
operations = [
migrations.AddField(
model_name='imageattachment',
name='last_updated',
field=models.DateTimeField(auto_now=True, null=True),
),
]
@@ -1,34 +0,0 @@
import django.core.validators
from django.db import migrations, models
import re
class Migration(migrations.Migration):
dependencies = [
('extras', '0065_imageattachment_change_logging'),
]
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 are allowed.',
regex='^[a-z0-9_]+$',
),
django.core.validators.RegexValidator(
flags=re.RegexFlag['IGNORECASE'],
inverse_match=True,
message='Double underscores are not permitted in custom field names.',
regex=r'__',
),
],
),
),
]
@@ -1,21 +0,0 @@
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('extras', '0066_customfield_name_validation'),
]
operations = [
migrations.AlterField(
model_name='customfield',
name='validation_maximum',
field=models.IntegerField(blank=True, null=True),
),
migrations.AlterField(
model_name='customfield',
name='validation_minimum',
field=models.IntegerField(blank=True, null=True),
),
]
@@ -1,18 +0,0 @@
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dcim', '0145_site_remove_deprecated_fields'),
('virtualization', '0026_vminterface_bridge'),
('extras', '0067_customfield_min_max_values'),
]
operations = [
migrations.AddField(
model_name='configcontext',
name='cluster_types',
field=models.ManyToManyField(blank=True, related_name='+', to='virtualization.ClusterType'),
),
]
@@ -1,18 +0,0 @@
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('contenttypes', '0002_remove_content_type_name'),
('extras', '0068_configcontext_cluster_types'),
]
operations = [
migrations.AddField(
model_name='customfield',
name='object_type',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='contenttypes.contenttype'),
),
]
@@ -1,18 +0,0 @@
# Generated by Django 3.2.11 on 2022-01-10 16:45
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('extras', '0069_custom_object_field'),
]
operations = [
migrations.AddField(
model_name='customlink',
name='enabled',
field=models.BooleanField(default=True),
),
]
@@ -1,89 +0,0 @@
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('extras', '0070_customlink_enabled'),
]
operations = [
# Model IDs
migrations.AlterField(
model_name='configcontext',
name='id',
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False),
),
migrations.AlterField(
model_name='configrevision',
name='id',
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False),
),
migrations.AlterField(
model_name='customfield',
name='id',
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False),
),
migrations.AlterField(
model_name='customlink',
name='id',
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False),
),
migrations.AlterField(
model_name='exporttemplate',
name='id',
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False),
),
migrations.AlterField(
model_name='imageattachment',
name='id',
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False),
),
migrations.AlterField(
model_name='jobresult',
name='id',
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False),
),
migrations.AlterField(
model_name='journalentry',
name='id',
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False),
),
migrations.AlterField(
model_name='objectchange',
name='id',
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False),
),
migrations.AlterField(
model_name='taggeditem',
name='id',
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False),
),
migrations.AlterField(
model_name='webhook',
name='id',
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False),
),
# GFK IDs
migrations.AlterField(
model_name='imageattachment',
name='object_id',
field=models.PositiveBigIntegerField(),
),
migrations.AlterField(
model_name='journalentry',
name='assigned_object_id',
field=models.PositiveBigIntegerField(),
),
migrations.AlterField(
model_name='objectchange',
name='changed_object_id',
field=models.PositiveBigIntegerField(),
),
migrations.AlterField(
model_name='objectchange',
name='related_object_id',
field=models.PositiveBigIntegerField(blank=True, null=True),
),
]
@@ -1,53 +0,0 @@
# Generated by Django 4.0.2 on 2022-02-08 18:54
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('extras', '0071_standardize_id_fields'),
]
operations = [
migrations.AlterField(
model_name='configcontext',
name='created',
field=models.DateTimeField(auto_now_add=True, null=True),
),
migrations.AlterField(
model_name='customfield',
name='created',
field=models.DateTimeField(auto_now_add=True, null=True),
),
migrations.AlterField(
model_name='customlink',
name='created',
field=models.DateTimeField(auto_now_add=True, null=True),
),
migrations.AlterField(
model_name='exporttemplate',
name='created',
field=models.DateTimeField(auto_now_add=True, null=True),
),
migrations.AlterField(
model_name='imageattachment',
name='created',
field=models.DateTimeField(auto_now_add=True, null=True),
),
migrations.AlterField(
model_name='journalentry',
name='created',
field=models.DateTimeField(auto_now_add=True, null=True),
),
migrations.AlterField(
model_name='tag',
name='created',
field=models.DateTimeField(auto_now_add=True, null=True),
),
migrations.AlterField(
model_name='webhook',
name='created',
field=models.DateTimeField(auto_now_add=True, null=True),
),
]
@@ -1,23 +0,0 @@
from utilities.json import CustomFieldJSONEncoder
from django.db import migrations, models
import taggit.managers
class Migration(migrations.Migration):
dependencies = [
('extras', '0072_created_datetimefield'),
]
operations = [
migrations.AddField(
model_name='journalentry',
name='custom_field_data',
field=models.JSONField(blank=True, default=dict, encoder=CustomFieldJSONEncoder),
),
migrations.AddField(
model_name='journalentry',
name='tags',
field=taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag'),
),
]
@@ -1,27 +0,0 @@
# Generated by Django 4.0.4 on 2022-04-15 17:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('extras', '0073_journalentry_tags_custom_fields'),
]
operations = [
migrations.AlterModelOptions(
name='customfield',
options={'ordering': ['group_name', 'weight', 'name']},
),
migrations.AddField(
model_name='customfield',
name='group_name',
field=models.CharField(blank=True, max_length=50),
),
migrations.AddField(
model_name='customfield',
name='ui_visibility',
field=models.CharField(default='read-write', max_length=50),
),
]
@@ -1,19 +0,0 @@
# Generated by Django 4.0.5 on 2022-06-22 19:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dcim', '0156_location_status'),
('extras', '0074_customfield_extensions'),
]
operations = [
migrations.AddField(
model_name='configcontext',
name='locations',
field=models.ManyToManyField(blank=True, related_name='+', to='dcim.location'),
),
]
@@ -1,18 +0,0 @@
# Generated by Django 4.0.6 on 2022-07-14 15:51
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('extras', '0075_configcontext_locations'),
]
operations = [
migrations.AlterField(
model_name='tag',
name='slug',
field=models.SlugField(allow_unicode=True, max_length=100, unique=True),
),
]
@@ -1,21 +0,0 @@
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('extras', '0076_tag_slug_unicode'),
]
operations = [
migrations.AlterField(
model_name='customlink',
name='link_text',
field=models.TextField(),
),
migrations.AlterField(
model_name='customlink',
name='link_url',
field=models.TextField(),
),
]
@@ -1,27 +0,0 @@
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('extras', '0077_customlink_extend_text_and_url'),
]
operations = [
migrations.AlterUniqueTogether(
name='exporttemplate',
unique_together=set(),
),
migrations.AlterUniqueTogether(
name='webhook',
unique_together=set(),
),
migrations.AddConstraint(
model_name='exporttemplate',
constraint=models.UniqueConstraint(fields=('content_type', 'name'), name='extras_exporttemplate_unique_content_type_name'),
),
migrations.AddConstraint(
model_name='webhook',
constraint=models.UniqueConstraint(fields=('payload_url', 'type_create', 'type_update', 'type_delete'), name='extras_webhook_unique_payload_url_types'),
),
]
@@ -1,31 +0,0 @@
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('extras', '0078_unique_constraints'),
]
operations = [
migrations.AddField(
model_name='jobresult',
name='scheduled',
field=models.DateTimeField(blank=True, null=True),
),
migrations.AddField(
model_name='jobresult',
name='interval',
field=models.PositiveIntegerField(blank=True, null=True, validators=[django.core.validators.MinValueValidator(1)]),
),
migrations.AddField(
model_name='jobresult',
name='started',
field=models.DateTimeField(blank=True, null=True),
),
migrations.AlterModelOptions(
name='jobresult',
options={'ordering': ['-created']},
),
]
@@ -1,32 +0,0 @@
from django.db import migrations, models
def copy_content_types(apps, schema_editor):
CustomLink = apps.get_model('extras', 'CustomLink')
for customlink in CustomLink.objects.all():
customlink.content_types.set([customlink.content_type])
class Migration(migrations.Migration):
dependencies = [
('contenttypes', '0002_remove_content_type_name'),
('extras', '0079_scheduled_jobs'),
]
operations = [
migrations.AddField(
model_name='customlink',
name='content_types',
field=models.ManyToManyField(related_name='custom_links', to='contenttypes.contenttype'),
),
migrations.RunPython(
code=copy_content_types,
reverse_code=migrations.RunPython.noop
),
migrations.RemoveField(
model_name='customlink',
name='content_type',
),
]
@@ -1,40 +0,0 @@
from django.db import migrations, models
def copy_content_types(apps, schema_editor):
ExportTemplate = apps.get_model('extras', 'ExportTemplate')
for et in ExportTemplate.objects.all():
et.content_types.set([et.content_type])
class Migration(migrations.Migration):
dependencies = [
('contenttypes', '0002_remove_content_type_name'),
('extras', '0080_customlink_content_types'),
]
operations = [
migrations.AddField(
model_name='exporttemplate',
name='content_types',
field=models.ManyToManyField(related_name='export_templates', to='contenttypes.contenttype'),
),
migrations.RunPython(
code=copy_content_types,
reverse_code=migrations.RunPython.noop
),
migrations.RemoveConstraint(
model_name='exporttemplate',
name='extras_exporttemplate_unique_content_type_name',
),
migrations.RemoveField(
model_name='exporttemplate',
name='content_type',
),
migrations.AlterModelOptions(
name='exporttemplate',
options={'ordering': ('name',)},
),
]
@@ -1,35 +0,0 @@
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('contenttypes', '0002_remove_content_type_name'),
('extras', '0081_exporttemplate_content_types'),
]
operations = [
migrations.CreateModel(
name='SavedFilter',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
('created', models.DateTimeField(auto_now_add=True, null=True)),
('last_updated', models.DateTimeField(auto_now=True, null=True)),
('name', models.CharField(max_length=100, unique=True)),
('slug', models.SlugField(max_length=100, unique=True)),
('description', models.CharField(blank=True, max_length=200)),
('weight', models.PositiveSmallIntegerField(default=100)),
('enabled', models.BooleanField(default=True)),
('shared', models.BooleanField(default=True)),
('parameters', models.JSONField()),
('content_types', models.ManyToManyField(related_name='saved_filters', to='contenttypes.contenttype')),
('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
],
options={
'ordering': ('weight', 'name'),
},
),
]
-44
View File
@@ -1,44 +0,0 @@
import uuid
import django.db.models.deletion
import django.db.models.lookups
from django.db import migrations, models
import extras.fields
class Migration(migrations.Migration):
dependencies = [
('circuits', '0041_standardize_description_comments'),
('contenttypes', '0002_remove_content_type_name'),
('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'),
]
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)),
('value', extras.fields.CachedValueField()),
('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'),
},
),
]
-45
View File
@@ -1,45 +0,0 @@
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('contenttypes', '0002_remove_content_type_name'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('extras', '0083_search'),
]
operations = [
migrations.CreateModel(
name='Branch',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
('created', models.DateTimeField(auto_now_add=True, null=True)),
('last_updated', models.DateTimeField(auto_now=True, null=True)),
('name', models.CharField(max_length=100, unique=True)),
('description', models.CharField(blank=True, max_length=200)),
('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
],
options={
'ordering': ('name',),
},
),
migrations.CreateModel(
name='StagedChange',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
('created', models.DateTimeField(auto_now_add=True, null=True)),
('last_updated', models.DateTimeField(auto_now=True, null=True)),
('action', models.CharField(max_length=20)),
('object_id', models.PositiveBigIntegerField(blank=True, null=True)),
('data', models.JSONField(blank=True, null=True)),
('branch', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='staged_changes', to='extras.branch')),
('object_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='contenttypes.contenttype')),
],
options={
'ordering': ('pk',),
},
),
]
@@ -1,65 +0,0 @@
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
('extras', '0084_staging'),
]
operations = [
# ConfigContexts
migrations.AddField(
model_name='configcontext',
name='data_file',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='core.datafile'),
),
migrations.AddField(
model_name='configcontext',
name='data_path',
field=models.CharField(blank=True, editable=False, max_length=1000),
),
migrations.AddField(
model_name='configcontext',
name='data_source',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='core.datasource'),
),
migrations.AddField(
model_name='configcontext',
name='auto_sync_enabled',
field=models.BooleanField(default=False),
),
migrations.AddField(
model_name='configcontext',
name='data_synced',
field=models.DateTimeField(blank=True, editable=False, null=True),
),
# ExportTemplates
migrations.AddField(
model_name='exporttemplate',
name='data_file',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='core.datafile'),
),
migrations.AddField(
model_name='exporttemplate',
name='data_path',
field=models.CharField(blank=True, editable=False, max_length=1000),
),
migrations.AddField(
model_name='exporttemplate',
name='data_source',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='core.datasource'),
),
migrations.AddField(
model_name='exporttemplate',
name='auto_sync_enabled',
field=models.BooleanField(default=False),
),
migrations.AddField(
model_name='exporttemplate',
name='data_synced',
field=models.DateTimeField(blank=True, editable=False, null=True),
),
]
@@ -1,35 +0,0 @@
from django.db import migrations, models
import django.db.models.deletion
import taggit.managers
class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
('extras', '0085_synced_data'),
]
operations = [
migrations.CreateModel(
name='ConfigTemplate',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
('created', models.DateTimeField(auto_now_add=True, null=True)),
('last_updated', models.DateTimeField(auto_now=True, null=True)),
('data_path', models.CharField(blank=True, editable=False, max_length=1000)),
('data_synced', models.DateTimeField(blank=True, editable=False, null=True)),
('name', models.CharField(max_length=100)),
('description', models.CharField(blank=True, max_length=200)),
('template_code', models.TextField()),
('environment_params', models.JSONField(blank=True, default=dict, null=True)),
('data_file', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='core.datafile')),
('data_source', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='core.datasource')),
('auto_sync_enabled', models.BooleanField(default=False)),
('tags', taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag')),
],
options={
'ordering': ('name',),
},
),
]
@@ -1,25 +0,0 @@
# Generated by Django 4.1.7 on 2023-02-24 00:56
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('extras', '0086_configtemplate'),
]
operations = [
migrations.CreateModel(
name='Dashboard',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
('layout', models.JSONField(default=list)),
('config', models.JSONField(default=dict)),
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='dashboard', to=settings.AUTH_USER_MODEL)),
],
),
]
@@ -1,23 +0,0 @@
# Generated by Django 4.1.7 on 2023-02-28 19:11
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('extras', '0087_dashboard'),
]
operations = [
migrations.AddField(
model_name='webhook',
name='type_job_end',
field=models.BooleanField(default=False),
),
migrations.AddField(
model_name='webhook',
name='type_job_start',
field=models.BooleanField(default=False),
),
]
@@ -1,18 +0,0 @@
# Generated by Django 4.1.2 on 2022-11-17 18:25
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('extras', '0088_jobresult_webhooks'),
]
operations = [
migrations.AddField(
model_name='customfield',
name='is_cloneable',
field=models.BooleanField(default=False),
),
]
@@ -1,18 +0,0 @@
# Generated by Django 4.1.7 on 2023-03-16 20:06
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('extras', '0089_customfield_is_cloneable'),
]
operations = [
migrations.AlterField(
model_name='objectchange',
name='request_id',
field=models.UUIDField(db_index=True, editable=False),
),
]
@@ -1,79 +0,0 @@
import os
import pkgutil
from django.conf import settings
from django.db import migrations, models
import extras.models.mixins
def create_files(cls, root_name, root_path):
modules = list(pkgutil.iter_modules([root_path]))
filenames = []
for importer, module_name, ispkg in modules:
try:
module = importer.find_module(module_name).load_module(module_name)
rel_path = os.path.relpath(module.__file__, root_path)
filenames.append(rel_path)
except ImportError:
pass
managed_files = [
cls(file_root=root_name, file_path=filename)
for filename in filenames
]
cls.objects.bulk_create(managed_files)
def replicate_scripts(apps, schema_editor):
ScriptModule = apps.get_model('extras', 'ScriptModule')
create_files(ScriptModule, 'scripts', settings.SCRIPTS_ROOT)
def replicate_reports(apps, schema_editor):
ReportModule = apps.get_model('extras', 'ReportModule')
create_files(ReportModule, 'reports', settings.REPORTS_ROOT)
class Migration(migrations.Migration):
dependencies = [
('core', '0002_managedfile'),
('extras', '0090_objectchange_index_request_id'),
]
operations = [
# Create proxy models
migrations.CreateModel(
name='ReportModule',
fields=[
],
options={
'proxy': True,
'indexes': [],
'constraints': [],
},
bases=(extras.models.mixins.PythonModuleMixin, 'core.managedfile', models.Model),
),
migrations.CreateModel(
name='ScriptModule',
fields=[
],
options={
'proxy': True,
'indexes': [],
'constraints': [],
},
bases=(extras.models.mixins.PythonModuleMixin, 'core.managedfile', models.Model),
),
# Instantiate ManagedFiles to represent scripts & reports
migrations.RunPython(
code=replicate_scripts,
reverse_code=migrations.RunPython.noop
),
migrations.RunPython(
code=replicate_reports,
reverse_code=migrations.RunPython.noop
),
]
@@ -1,16 +0,0 @@
# Generated by Django 4.1.7 on 2023-03-27 17:31
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('extras', '0091_create_managedfiles'),
]
operations = [
migrations.DeleteModel(
name='JobResult',
),
]
@@ -1,17 +0,0 @@
# Generated by Django 4.1.9 on 2023-06-22 14:14
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('extras', '0092_delete_jobresult'),
]
operations = [
migrations.AlterModelOptions(
name='configrevision',
options={'ordering': ['-created']},
),
]
@@ -1,22 +0,0 @@
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('contenttypes', '0002_remove_content_type_name'),
('extras', '0093_configrevision_ordering'),
]
operations = [
migrations.AddField(
model_name='tag',
name='object_types',
field=models.ManyToManyField(blank=True, related_name='+', to='contenttypes.contenttype'),
),
migrations.RenameIndex(
model_name='taggeditem',
new_name='extras_tagg_content_717743_idx',
old_fields=('content_type', 'object_id'),
),
]
@@ -1,34 +0,0 @@
# Generated by Django 4.1.9 on 2023-06-29 14:07
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('contenttypes', '0002_remove_content_type_name'),
('extras', '0094_tag_object_types'),
]
operations = [
migrations.CreateModel(
name='Bookmark',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
('created', models.DateTimeField(auto_now_add=True)),
('object_id', models.PositiveBigIntegerField()),
('object_type', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='contenttypes.contenttype')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
],
options={
'ordering': ('created', 'pk'),
},
),
migrations.AddConstraint(
model_name='bookmark',
constraint=models.UniqueConstraint(fields=('object_type', 'object_id', 'user'), name='extras_bookmark_unique_per_object_and_user'),
),
]
@@ -1,62 +0,0 @@
import django.contrib.postgres.fields
from django.db import migrations, models
from extras.choices import CustomFieldTypeChoices
def create_choice_sets(apps, schema_editor):
"""
Create a CustomFieldChoiceSet for each CustomField with choices defined.
"""
CustomField = apps.get_model('extras', 'CustomField')
CustomFieldChoiceSet = apps.get_model('extras', 'CustomFieldChoiceSet')
# Create custom field choice sets
choice_fields = CustomField.objects.filter(
type__in=(CustomFieldTypeChoices.TYPE_SELECT, CustomFieldTypeChoices.TYPE_MULTISELECT),
choices__len__gt=0
)
for cf in choice_fields:
choiceset = CustomFieldChoiceSet.objects.create(
name=f'{cf.name} Choices',
extra_choices=tuple(zip(cf.choices, cf.choices)) # Convert list to tuple of two-tuples
)
cf.choice_set = choiceset
# Update custom fields to point to new choice sets
CustomField.objects.bulk_update(choice_fields, ['choice_set'])
class Migration(migrations.Migration):
dependencies = [
('extras', '0095_bookmarks'),
]
operations = [
migrations.CreateModel(
name='CustomFieldChoiceSet',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
('created', models.DateTimeField(auto_now_add=True, null=True)),
('last_updated', models.DateTimeField(auto_now=True, null=True)),
('name', models.CharField(max_length=100, unique=True)),
('description', models.CharField(blank=True, max_length=200)),
('base_choices', models.CharField(blank=True, max_length=50)),
('extra_choices', django.contrib.postgres.fields.ArrayField(base_field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=100), size=2), blank=True, null=True, size=None)),
('order_alphabetically', models.BooleanField(default=False)),
],
options={
'ordering': ('name',),
},
),
migrations.AddField(
model_name='customfield',
name='choice_set',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='choices_for', to='extras.customfieldchoiceset'),
),
migrations.RunPython(
code=create_choice_sets,
reverse_code=migrations.RunPython.noop
),
]
@@ -1,17 +0,0 @@
# Generated by Django 4.1.10 on 2023-07-17 15:22
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('extras', '0096_customfieldchoiceset'),
]
operations = [
migrations.RemoveField(
model_name='customfield',
name='choices',
),
]
@@ -1,25 +0,0 @@
# Generated by Django 4.1.10 on 2023-08-01 16:32
from django.db import migrations, models
import taggit.managers
import utilities.json
class Migration(migrations.Migration):
dependencies = [
('extras', '0097_customfield_remove_choices'),
]
operations = [
migrations.AddField(
model_name='webhook',
name='custom_field_data',
field=models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder),
),
migrations.AddField(
model_name='webhook',
name='tags',
field=taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag'),
),
]