8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-27 07:02:26 +00:00
re2o/topologie/migrations/0067_auto_20181230_1819.py
Hugo Levy-Falk c4a104b3b6 I like my black.
Just ran black on the whoe repository. Fix #210.
2019-11-04 22:47:24 +01:00

111 lines
3.6 KiB
Python

# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2018-12-30 17:19
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import re2o.mixins
class Migration(migrations.Migration):
dependencies = [("topologie", "0066_modelswitch_commercial_name")]
operations = [
migrations.CreateModel(
name="ModuleOnSwitch",
fields=[
(
"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"
),
),
],
options={
"verbose_name": "link between switchs and modules",
"permissions": (
("view_moduleonswitch", "Can view a moduleonswitch object"),
),
},
bases=(re2o.mixins.AclMixin, re2o.mixins.RevMixin, models.Model),
),
migrations.CreateModel(
name="ModuleSwitch",
fields=[
(
"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",
),
),
],
options={
"verbose_name": "Module of a switch",
"permissions": (("view_moduleswitch", "Can view a module object"),),
},
bases=(re2o.mixins.AclMixin, re2o.mixins.RevMixin, models.Model),
),
migrations.AddField(
model_name="modelswitch",
name="is_itself_module",
field=models.BooleanField(
default=False,
help_text="Does the switch, itself, considered as a module",
),
),
migrations.AddField(
model_name="modelswitch",
name="is_modular",
field=models.BooleanField(
default=False, help_text="Is this switch model modular"
),
),
migrations.AddField(
model_name="moduleonswitch",
name="module",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="topologie.ModuleSwitch"
),
),
migrations.AddField(
model_name="moduleonswitch",
name="switch",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="topologie.Switch"
),
),
migrations.AlterUniqueTogether(
name="moduleonswitch", unique_together=set([("slot", "switch")])
),
]