mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-22 19:33:11 +00:00
220 lines
10 KiB
Python
220 lines
10 KiB
Python
# -*- coding: utf-8 -*-
|
|
# Generated by Django 1.10.7 on 2018-03-20 19:57
|
|
from __future__ import unicode_literals
|
|
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
replaces = [('topologie', '0001_initial'), ('topologie', '0002_auto_20160703_1118'), ('topologie', '0003_room'), ('topologie', '0004_auto_20160703_1122'), ('topologie', '0005_auto_20160703_1123'), ('topologie', '0006_auto_20160703_1129'), ('topologie', '0007_auto_20160703_1148'), ('topologie', '0008_port_room'), ('topologie', '0009_auto_20160703_1200'), ('topologie', '0010_auto_20160704_2148'), ('topologie', '0011_auto_20160704_2153'), ('topologie', '0012_port_machine_interface'), ('topologie', '0013_port_related'), ('topologie', '0014_auto_20160706_1238'), ('topologie', '0015_auto_20160706_1452'), ('topologie', '0016_auto_20160706_1531'), ('topologie', '0017_auto_20160718_1141'), ('topologie', '0018_room_details'), ('topologie', '0019_auto_20161026_1348'), ('topologie', '0020_auto_20161119_0033'), ('topologie', '0021_port_radius'), ('topologie', '0022_auto_20161211_1622'), ('topologie', '0023_auto_20170826_1530'), ('topologie', '0024_auto_20170826_1800'), ('topologie', '0023_auto_20170817_1654'), ('topologie', '0024_auto_20170818_1021'), ('topologie', '0025_merge_20170902_1242'), ('topologie', '0026_auto_20170902_1245'), ('topologie', '0027_auto_20170905_1442'), ('topologie', '0028_auto_20170913_1503'), ('topologie', '0029_auto_20171002_0334'), ('topologie', '0030_auto_20171004_0235'), ('topologie', '0031_auto_20171015_2033'), ('topologie', '0032_auto_20171026_0338'), ('topologie', '0033_auto_20171231_1743')]
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
('contenttypes', '0002_remove_content_type_name'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Switch',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('building', models.CharField(max_length=10)),
|
|
('number', models.IntegerField()),
|
|
('details', models.CharField(blank=True, max_length=255)),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='Port',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('port', models.IntegerField()),
|
|
('details', models.CharField(blank=True, max_length=255)),
|
|
('switch', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ports', to='topologie.Switch')),
|
|
('room', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='topologie.Room')),
|
|
('machine_interface', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='machines.Interface')),
|
|
('related', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='related_port', to='topologie.Port')),
|
|
('radius', models.CharField(choices=[('NO', 'NO'), ('STRICT', 'STRICT'), ('BLOQ', 'BLOQ'), ('COMMON', 'COMMON')], default='NO', max_length=32)),
|
|
('vlan_force', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='machines.Vlan')),
|
|
],
|
|
),
|
|
migrations.AlterUniqueTogether(
|
|
name='port',
|
|
unique_together=set([('switch', 'port')]),
|
|
),
|
|
migrations.CreateModel(
|
|
name='Room',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('details', models.CharField(blank=True, max_length=255)),
|
|
('building', models.CharField(max_length=255, unique=True)),
|
|
('number', models.IntegerField()),
|
|
('room', models.IntegerField(default=1)),
|
|
],
|
|
),
|
|
migrations.AddField(
|
|
model_name='switch',
|
|
name='location',
|
|
field=models.CharField(default='test', max_length=255),
|
|
preserve_default=False,
|
|
),
|
|
migrations.AddField(
|
|
model_name='switch',
|
|
name='switch_interface',
|
|
field=models.OneToOneField(default=1, on_delete=django.db.models.deletion.CASCADE, to='machines.Interface'),
|
|
preserve_default=False,
|
|
),
|
|
migrations.AlterUniqueTogether(
|
|
name='switch',
|
|
unique_together=set([]),
|
|
),
|
|
migrations.AlterUniqueTogether(
|
|
name='room',
|
|
unique_together=set([('building', 'number')]),
|
|
),
|
|
migrations.AlterField(
|
|
model_name='room',
|
|
name='building',
|
|
field=models.CharField(max_length=255),
|
|
),
|
|
migrations.AlterField(
|
|
model_name='room',
|
|
name='number',
|
|
field=models.IntegerField(blank=True),
|
|
),
|
|
migrations.AlterUniqueTogether(
|
|
name='room',
|
|
unique_together=set([('building', 'room', 'number')]),
|
|
),
|
|
migrations.AlterField(
|
|
model_name='room',
|
|
name='number',
|
|
field=models.IntegerField(blank=True, null=True),
|
|
),
|
|
migrations.RenameField(
|
|
model_name='room',
|
|
old_name='building',
|
|
new_name='name',
|
|
),
|
|
migrations.AlterUniqueTogether(
|
|
name='room',
|
|
unique_together=set([]),
|
|
),
|
|
migrations.RemoveField(
|
|
model_name='room',
|
|
name='details',
|
|
),
|
|
migrations.RemoveField(
|
|
model_name='room',
|
|
name='number',
|
|
),
|
|
migrations.RemoveField(
|
|
model_name='room',
|
|
name='room',
|
|
),
|
|
migrations.AlterField(
|
|
model_name='room',
|
|
name='name',
|
|
field=models.CharField(max_length=255, unique=True),
|
|
),
|
|
migrations.AddField(
|
|
model_name='room',
|
|
name='details',
|
|
field=models.CharField(blank=True, max_length=255),
|
|
),
|
|
migrations.RemoveField(
|
|
model_name='switch',
|
|
name='building',
|
|
),
|
|
migrations.CreateModel(
|
|
name='Stack',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('name', models.CharField(blank=True, max_length=32, null=True)),
|
|
('stack_id', models.CharField(max_length=32, unique=True)),
|
|
('details', models.CharField(blank=True, max_length=255, null=True)),
|
|
('member_id_min', models.PositiveIntegerField()),
|
|
('member_id_max', models.PositiveIntegerField()),
|
|
],
|
|
),
|
|
migrations.AddField(
|
|
model_name='switch',
|
|
name='stack_member_id',
|
|
field=models.IntegerField(blank=True, null=True),
|
|
),
|
|
migrations.AddField(
|
|
model_name='switch',
|
|
name='stack',
|
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='topologie.Stack'),
|
|
),
|
|
migrations.AlterUniqueTogether(
|
|
name='switch',
|
|
unique_together=set([('stack', 'stack_member_id')]),
|
|
),
|
|
migrations.AlterField(
|
|
model_name='switch',
|
|
name='stack',
|
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='topologie.Stack'),
|
|
),
|
|
migrations.AlterModelOptions(
|
|
name='room',
|
|
options={'ordering': ['name'], 'permissions': (('view_room', 'Peut voir un objet chambre'),)},
|
|
),
|
|
migrations.AlterField(
|
|
model_name='port',
|
|
name='port',
|
|
field=models.PositiveIntegerField(),
|
|
),
|
|
migrations.AlterField(
|
|
model_name='switch',
|
|
name='number',
|
|
field=models.PositiveIntegerField(),
|
|
),
|
|
migrations.AlterField(
|
|
model_name='switch',
|
|
name='stack_member_id',
|
|
field=models.PositiveIntegerField(blank=True, null=True),
|
|
),
|
|
migrations.CreateModel(
|
|
name='ConstructorSwitch',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('name', models.CharField(max_length=255)),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='ModelSwitch',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('reference', models.CharField(max_length=255)),
|
|
('constructor', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='topologie.ConstructorSwitch')),
|
|
],
|
|
),
|
|
migrations.AddField(
|
|
model_name='switch',
|
|
name='model',
|
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='topologie.ModelSwitch'),
|
|
),
|
|
migrations.AlterModelOptions(
|
|
name='constructorswitch',
|
|
options={'permissions': (('view_constructorswitch', 'Peut voir un objet constructorswitch'),)},
|
|
),
|
|
migrations.AlterModelOptions(
|
|
name='modelswitch',
|
|
options={'permissions': (('view_modelswitch', 'Peut voir un objet modelswitch'),)},
|
|
),
|
|
migrations.AlterModelOptions(
|
|
name='port',
|
|
options={'permissions': (('view_port', 'Peut voir un objet port'),)},
|
|
),
|
|
migrations.AlterModelOptions(
|
|
name='stack',
|
|
options={'permissions': (('view_stack', 'Peut voir un objet stack'),)},
|
|
),
|
|
migrations.AlterModelOptions(
|
|
name='switch',
|
|
options={'permissions': (('view_switch', 'Peut voir un objet switch'),)},
|
|
),
|
|
]
|