2021-07-09 11:11:21 -04:00
|
|
|
from django.db import migrations, models
|
|
|
|
import django.db.models.deletion
|
2024-01-19 13:55:22 -05:00
|
|
|
import utilities.json
|
2021-07-09 11:11:21 -04:00
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
initial = True
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='Circuit',
|
|
|
|
fields=[
|
2024-01-19 13:55:22 -05:00
|
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
|
|
|
|
('created', models.DateTimeField(auto_now_add=True, null=True)),
|
2021-07-09 11:11:21 -04:00
|
|
|
('last_updated', models.DateTimeField(auto_now=True, null=True)),
|
2024-01-19 13:55:22 -05:00
|
|
|
('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
|
|
|
|
('description', models.CharField(blank=True, max_length=200)),
|
|
|
|
('comments', models.TextField(blank=True)),
|
2021-07-09 11:11:21 -04:00
|
|
|
('cid', models.CharField(max_length=100)),
|
|
|
|
('status', models.CharField(default='active', max_length=50)),
|
|
|
|
('install_date', models.DateField(blank=True, null=True)),
|
2024-01-19 13:55:22 -05:00
|
|
|
('termination_date', models.DateField(blank=True, null=True)),
|
2021-07-09 11:11:21 -04:00
|
|
|
('commit_rate', models.PositiveIntegerField(blank=True, null=True)),
|
|
|
|
],
|
|
|
|
options={
|
2024-01-19 13:55:22 -05:00
|
|
|
'verbose_name': 'circuit',
|
|
|
|
'verbose_name_plural': 'circuits',
|
|
|
|
'ordering': ['provider', 'provider_account', 'cid'],
|
2021-07-09 11:11:21 -04:00
|
|
|
},
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='CircuitTermination',
|
|
|
|
fields=[
|
2024-01-19 13:55:22 -05:00
|
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
|
|
|
|
('created', models.DateTimeField(auto_now_add=True, null=True)),
|
2021-07-09 11:11:21 -04:00
|
|
|
('last_updated', models.DateTimeField(auto_now=True, null=True)),
|
2024-01-19 13:55:22 -05:00
|
|
|
('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
|
|
|
|
('cable_end', models.CharField(blank=True, max_length=1)),
|
2021-07-09 11:11:21 -04:00
|
|
|
('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={
|
2024-01-19 13:55:22 -05:00
|
|
|
'verbose_name': 'circuit termination',
|
|
|
|
'verbose_name_plural': 'circuit terminations',
|
2021-07-09 11:11:21 -04:00
|
|
|
'ordering': ['circuit', 'term_side'],
|
|
|
|
},
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='CircuitType',
|
|
|
|
fields=[
|
2024-01-19 13:55:22 -05:00
|
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
|
|
|
|
('created', models.DateTimeField(auto_now_add=True, null=True)),
|
2021-07-09 11:11:21 -04:00
|
|
|
('last_updated', models.DateTimeField(auto_now=True, null=True)),
|
2024-01-19 13:55:22 -05:00
|
|
|
('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
|
2021-07-09 11:11:21 -04:00
|
|
|
('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={
|
2024-01-19 13:55:22 -05:00
|
|
|
'verbose_name': 'circuit type',
|
|
|
|
'verbose_name_plural': 'circuit types',
|
2022-11-03 13:59:44 -04:00
|
|
|
'ordering': ('name',),
|
2021-07-09 11:11:21 -04:00
|
|
|
},
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='Provider',
|
|
|
|
fields=[
|
2024-01-19 13:55:22 -05:00
|
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
|
|
|
|
('created', models.DateTimeField(auto_now_add=True, null=True)),
|
2021-07-09 11:11:21 -04:00
|
|
|
('last_updated', models.DateTimeField(auto_now=True, null=True)),
|
2024-01-19 13:55:22 -05:00
|
|
|
('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
|
|
|
|
('description', models.CharField(blank=True, max_length=200)),
|
|
|
|
('comments', models.TextField(blank=True)),
|
2021-07-09 11:11:21 -04:00
|
|
|
('name', models.CharField(max_length=100, unique=True)),
|
|
|
|
('slug', models.SlugField(max_length=100, unique=True)),
|
|
|
|
],
|
|
|
|
options={
|
2024-01-19 13:55:22 -05:00
|
|
|
'verbose_name': 'provider',
|
|
|
|
'verbose_name_plural': 'providers',
|
2021-07-09 11:11:21 -04:00
|
|
|
'ordering': ['name'],
|
|
|
|
},
|
|
|
|
),
|
2024-01-19 13:55:22 -05:00
|
|
|
migrations.CreateModel(
|
|
|
|
name='ProviderAccount',
|
|
|
|
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)),
|
|
|
|
('description', models.CharField(blank=True, max_length=200)),
|
|
|
|
('comments', models.TextField(blank=True)),
|
|
|
|
('account', models.CharField(max_length=100)),
|
|
|
|
('name', models.CharField(blank=True, max_length=100)),
|
|
|
|
],
|
|
|
|
options={
|
|
|
|
'verbose_name': 'provider account',
|
|
|
|
'verbose_name_plural': 'provider accounts',
|
|
|
|
'ordering': ('provider', 'account'),
|
|
|
|
},
|
|
|
|
),
|
2021-07-09 11:11:21 -04:00
|
|
|
migrations.CreateModel(
|
|
|
|
name='ProviderNetwork',
|
|
|
|
fields=[
|
2024-01-19 13:55:22 -05:00
|
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
|
|
|
|
('created', models.DateTimeField(auto_now_add=True, null=True)),
|
2021-07-09 11:11:21 -04:00
|
|
|
('last_updated', models.DateTimeField(auto_now=True, null=True)),
|
2024-01-19 13:55:22 -05:00
|
|
|
('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
|
2021-07-09 11:11:21 -04:00
|
|
|
('description', models.CharField(blank=True, max_length=200)),
|
|
|
|
('comments', models.TextField(blank=True)),
|
2024-01-19 13:55:22 -05:00
|
|
|
('name', models.CharField(max_length=100)),
|
|
|
|
('service_id', models.CharField(blank=True, max_length=100)),
|
2021-07-09 11:11:21 -04:00
|
|
|
('provider', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='networks', to='circuits.provider')),
|
|
|
|
],
|
|
|
|
options={
|
2024-01-19 13:55:22 -05:00
|
|
|
'verbose_name': 'provider network',
|
|
|
|
'verbose_name_plural': 'provider networks',
|
2021-07-09 11:11:21 -04:00
|
|
|
'ordering': ('provider', 'name'),
|
|
|
|
},
|
|
|
|
),
|
|
|
|
]
|