8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-17 20:43:46 +00:00
re2o/topologie/migrations/0056_building_switchbay.py

78 lines
2.4 KiB
Python
Raw Normal View History

2018-04-07 18:45:29 +00:00
# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2018-04-07 17:41
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", "0055_auto_20180329_0431")]
2018-04-07 18:45:29 +00:00
operations = [
migrations.CreateModel(
name="Building",
2018-04-07 18:45:29 +00:00
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("name", models.CharField(max_length=255)),
2018-04-07 18:45:29 +00:00
],
options={
"permissions": (("view_building", "Peut voir un objet batiment"),)
2018-04-07 18:45:29 +00:00
},
bases=(re2o.mixins.AclMixin, re2o.mixins.RevMixin, models.Model),
),
migrations.CreateModel(
name="SwitchBay",
2018-04-07 18:45:29 +00:00
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("name", models.CharField(max_length=255)),
(
"info",
models.CharField(
blank=True,
help_text="Informations particulières",
max_length=255,
null=True,
),
),
(
"building",
models.ForeignKey(
on_delete=django.db.models.deletion.PROTECT,
to="topologie.Building",
),
),
(
"members",
models.ManyToManyField(
blank=True, related_name="bay_switches", to="topologie.Switch"
),
),
2018-04-07 18:45:29 +00:00
],
options={
"permissions": (
("view_switchbay", "Peut voir un objet baie de brassage"),
)
2018-04-07 18:45:29 +00:00
},
bases=(re2o.mixins.AclMixin, re2o.mixins.RevMixin, models.Model),
),
]