Skip to content

Closes #6471: Squash database migrations up to v2.11.0 #6739

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
62 changes: 0 additions & 62 deletions netbox/circuits/migrations/0001_initial.py

This file was deleted.

107 changes: 107 additions & 0 deletions netbox/circuits/migrations/0001_squashed.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
import dcim.fields
import django.core.serializers.json
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

initial = True

dependencies = [
]

replaces = [
('circuits', '0001_initial'),
]

operations = [
migrations.CreateModel(
name='Circuit',
fields=[
('created', models.DateField(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=django.core.serializers.json.DjangoJSONEncoder)),
('id', models.BigAutoField(primary_key=True, serialize=False)),
('cid', models.CharField(max_length=100)),
('status', models.CharField(default='active', max_length=50)),
('install_date', models.DateField(blank=True, null=True)),
('commit_rate', models.PositiveIntegerField(blank=True, null=True)),
('description', models.CharField(blank=True, max_length=200)),
('comments', models.TextField(blank=True)),
],
options={
'ordering': ['provider', 'cid'],
},
),
migrations.CreateModel(
name='CircuitTermination',
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)),
('_cable_peer_id', models.PositiveIntegerField(blank=True, null=True)),
('mark_connected', models.BooleanField(default=False)),
('term_side', models.CharField(max_length=1)),
('port_speed', models.PositiveIntegerField(blank=True, null=True)),
('upstream_speed', models.PositiveIntegerField(blank=True, null=True)),
('xconnect_id', models.CharField(blank=True, max_length=50)),
('pp_info', models.CharField(blank=True, max_length=100)),
('description', models.CharField(blank=True, max_length=200)),
],
options={
'ordering': ['circuit', 'term_side'],
},
),
migrations.CreateModel(
name='CircuitType',
fields=[
('created', models.DateField(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=django.core.serializers.json.DjangoJSONEncoder)),
('id', models.BigAutoField(primary_key=True, serialize=False)),
('name', models.CharField(max_length=100, unique=True)),
('slug', models.SlugField(max_length=100, unique=True)),
('description', models.CharField(blank=True, max_length=200)),
],
options={
'ordering': ['name'],
},
),
migrations.CreateModel(
name='Provider',
fields=[
('created', models.DateField(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=django.core.serializers.json.DjangoJSONEncoder)),
('id', models.BigAutoField(primary_key=True, serialize=False)),
('name', models.CharField(max_length=100, unique=True)),
('slug', models.SlugField(max_length=100, unique=True)),
('asn', dcim.fields.ASNField(blank=True, null=True)),
('account', models.CharField(blank=True, max_length=30)),
('portal_url', models.URLField(blank=True)),
('noc_contact', models.TextField(blank=True)),
('admin_contact', models.TextField(blank=True)),
('comments', models.TextField(blank=True)),
],
options={
'ordering': ['name'],
},
),
migrations.CreateModel(
name='ProviderNetwork',
fields=[
('created', models.DateField(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=django.core.serializers.json.DjangoJSONEncoder)),
('id', models.BigAutoField(primary_key=True, serialize=False)),
('name', models.CharField(max_length=100)),
('description', models.CharField(blank=True, max_length=200)),
('comments', models.TextField(blank=True)),
('provider', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='networks', to='circuits.provider')),
],
options={
'ordering': ('provider', 'name'),
},
),
]
41 changes: 0 additions & 41 deletions netbox/circuits/migrations/0002_auto_20160622_1821.py

This file was deleted.

129 changes: 129 additions & 0 deletions netbox/circuits/migrations/0002_squashed_0029.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
from django.db import migrations, models
import django.db.models.deletion
import taggit.managers


class Migration(migrations.Migration):

dependencies = [
('dcim', '0001_initial'),
('contenttypes', '0002_remove_content_type_name'),
('circuits', '0001_initial'),
('extras', '0001_initial'),
('tenancy', '0001_initial'),
]

replaces = [
('circuits', '0002_auto_20160622_1821'),
('circuits', '0003_provider_32bit_asn_support'),
('circuits', '0004_circuit_add_tenant'),
('circuits', '0005_circuit_add_upstream_speed'),
('circuits', '0006_terminations'),
('circuits', '0007_circuit_add_description'),
('circuits', '0008_circuittermination_interface_protect_on_delete'),
('circuits', '0009_unicode_literals'),
('circuits', '0010_circuit_status'),
('circuits', '0011_tags'),
('circuits', '0012_change_logging'),
('circuits', '0013_cables'),
('circuits', '0014_circuittermination_description'),
('circuits', '0015_custom_tag_models'),
('circuits', '0016_3569_circuit_fields'),
('circuits', '0017_circuittype_description'),
('circuits', '0018_standardize_description'),
('circuits', '0019_nullbooleanfield_to_booleanfield'),
('circuits', '0020_custom_field_data'),
('circuits', '0021_cache_cable_peer'),
('circuits', '0022_cablepath'),
('circuits', '0023_circuittermination_port_speed_optional'),
('circuits', '0024_standardize_name_length'),
('circuits', '0025_standardize_models'),
('circuits', '0026_mark_connected'),
('circuits', '0027_providernetwork'),
('circuits', '0028_cache_circuit_terminations'),
('circuits', '0029_circuit_tracing'),
]

operations = [
migrations.AddField(
model_name='providernetwork',
name='tags',
field=taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag'),
),
migrations.AddField(
model_name='provider',
name='tags',
field=taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag'),
),
migrations.AddField(
model_name='circuittermination',
name='_cable_peer_type',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='contenttypes.contenttype'),
),
migrations.AddField(
model_name='circuittermination',
name='cable',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='dcim.cable'),
),
migrations.AddField(
model_name='circuittermination',
name='circuit',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='terminations', to='circuits.circuit'),
),
migrations.AddField(
model_name='circuittermination',
name='provider_network',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='circuit_terminations', to='circuits.providernetwork'),
),
migrations.AddField(
model_name='circuittermination',
name='site',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='circuit_terminations', to='dcim.site'),
),
migrations.AddField(
model_name='circuit',
name='provider',
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='circuits', to='circuits.provider'),
),
migrations.AddField(
model_name='circuit',
name='tags',
field=taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag'),
),
migrations.AddField(
model_name='circuit',
name='tenant',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='circuits', to='tenancy.tenant'),
),
migrations.AddField(
model_name='circuit',
name='termination_a',
field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='circuits.circuittermination'),
),
migrations.AddField(
model_name='circuit',
name='termination_z',
field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='circuits.circuittermination'),
),
migrations.AddField(
model_name='circuit',
name='type',
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='circuits', to='circuits.circuittype'),
),
migrations.AddConstraint(
model_name='providernetwork',
constraint=models.UniqueConstraint(fields=('provider', 'name'), name='circuits_providernetwork_provider_name'),
),
migrations.AlterUniqueTogether(
name='providernetwork',
unique_together={('provider', 'name')},
),
migrations.AlterUniqueTogether(
name='circuittermination',
unique_together={('circuit', 'term_side')},
),
migrations.AlterUniqueTogether(
name='circuit',
unique_together={('provider', 'cid')},
),
]
19 changes: 0 additions & 19 deletions netbox/circuits/migrations/0003_provider_32bit_asn_support.py

This file was deleted.

20 changes: 0 additions & 20 deletions netbox/circuits/migrations/0004_circuit_add_tenant.py

This file was deleted.

Loading