2018-12-30 16:04:21 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
2018-12-30 17:20:06 +00:00
|
|
|
# Generated by Django 1.10.7 on 2018-12-30 17:19
|
2018-12-30 16:04:21 +00:00
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
from django.db import migrations, models
|
|
|
|
import django.db.models.deletion
|
|
|
|
import re2o.mixins
|
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
2019-11-04 16:55:03 +00:00
|
|
|
dependencies = [("topologie", "0066_modelswitch_commercial_name")]
|
2018-12-30 16:04:21 +00:00
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
2019-11-04 16:55:03 +00:00
|
|
|
name="ModuleOnSwitch",
|
2018-12-30 16:04:21 +00:00
|
|
|
fields=[
|
2019-11-04 16:55:03 +00:00
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
serialize=False,
|
|
|
|
verbose_name="ID",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"slot",
|
|
|
|
models.CharField(
|
|
|
|
help_text="Slot on switch", max_length=15, verbose_name="Slot"
|
|
|
|
),
|
|
|
|
),
|
2018-12-30 16:04:21 +00:00
|
|
|
],
|
|
|
|
options={
|
2019-11-04 16:55:03 +00:00
|
|
|
"verbose_name": "link between switchs and modules",
|
|
|
|
"permissions": (
|
|
|
|
("view_moduleonswitch", "Can view a moduleonswitch object"),
|
|
|
|
),
|
2018-12-30 16:04:21 +00:00
|
|
|
},
|
|
|
|
bases=(re2o.mixins.AclMixin, re2o.mixins.RevMixin, models.Model),
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
2019-11-04 16:55:03 +00:00
|
|
|
name="ModuleSwitch",
|
2018-12-30 16:04:21 +00:00
|
|
|
fields=[
|
2019-11-04 16:55:03 +00:00
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
serialize=False,
|
|
|
|
verbose_name="ID",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"reference",
|
|
|
|
models.CharField(
|
|
|
|
help_text="Reference of a module",
|
|
|
|
max_length=255,
|
|
|
|
verbose_name="Module reference",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"comment",
|
|
|
|
models.CharField(
|
|
|
|
blank=True,
|
|
|
|
help_text="Comment",
|
|
|
|
max_length=255,
|
|
|
|
null=True,
|
|
|
|
verbose_name="Comment",
|
|
|
|
),
|
|
|
|
),
|
2018-12-30 16:04:21 +00:00
|
|
|
],
|
|
|
|
options={
|
2019-11-04 16:55:03 +00:00
|
|
|
"verbose_name": "Module of a switch",
|
|
|
|
"permissions": (("view_moduleswitch", "Can view a module object"),),
|
2018-12-30 16:04:21 +00:00
|
|
|
},
|
|
|
|
bases=(re2o.mixins.AclMixin, re2o.mixins.RevMixin, models.Model),
|
|
|
|
),
|
|
|
|
migrations.AddField(
|
2019-11-04 16:55:03 +00:00
|
|
|
model_name="modelswitch",
|
|
|
|
name="is_itself_module",
|
|
|
|
field=models.BooleanField(
|
|
|
|
default=False,
|
|
|
|
help_text="Does the switch, itself, considered as a module",
|
|
|
|
),
|
2018-12-30 16:04:21 +00:00
|
|
|
),
|
|
|
|
migrations.AddField(
|
2019-11-04 16:55:03 +00:00
|
|
|
model_name="modelswitch",
|
|
|
|
name="is_modular",
|
|
|
|
field=models.BooleanField(
|
|
|
|
default=False, help_text="Is this switch model modular"
|
|
|
|
),
|
2018-12-30 16:04:21 +00:00
|
|
|
),
|
|
|
|
migrations.AddField(
|
2019-11-04 16:55:03 +00:00
|
|
|
model_name="moduleonswitch",
|
|
|
|
name="module",
|
|
|
|
field=models.ForeignKey(
|
|
|
|
on_delete=django.db.models.deletion.CASCADE, to="topologie.ModuleSwitch"
|
|
|
|
),
|
2018-12-30 16:04:21 +00:00
|
|
|
),
|
|
|
|
migrations.AddField(
|
2019-11-04 16:55:03 +00:00
|
|
|
model_name="moduleonswitch",
|
|
|
|
name="switch",
|
|
|
|
field=models.ForeignKey(
|
|
|
|
on_delete=django.db.models.deletion.CASCADE, to="topologie.Switch"
|
|
|
|
),
|
2018-12-30 16:04:21 +00:00
|
|
|
),
|
2018-12-30 17:20:06 +00:00
|
|
|
migrations.AlterUniqueTogether(
|
2019-11-04 16:55:03 +00:00
|
|
|
name="moduleonswitch", unique_together=set([("slot", "switch")])
|
2018-12-30 17:20:06 +00:00
|
|
|
),
|
2018-12-30 16:04:21 +00:00
|
|
|
]
|