Files
Webanwendung-Netzwerk-Planer/inventar/migrations/0004_netz_typ_vpn.py
T
H4nSoloandClaude Opus 5.5 ae15a0aba8 Netztyp VPN: standortübergreifende Tunnelnetze, Konzept v0.6
- Netz-Typ VPN; Standort optional nur für VPN, kein DHCP-Bereich
- Eindeutigkeit von Netzen ohne Standort per bedingter UniqueConstraint
- README: Netztyp, Regel, WireGuard-Netz 172.25.25.0/24 in Kapitel 10
- AUFBAUPLAN: Schritt 2 (Gegenstelle, Tunnel, Standort-Rahmen) in Phase 7
- 66 Tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 14:47:59 +01:00

29 lines
1.1 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Generated by Django 5.2.19 on 2026-11-24 13:22
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('inventar', '0003_ipadresse_bridge'),
]
operations = [
migrations.AlterField(
model_name='netz',
name='standort',
field=models.ForeignKey(blank=True, help_text='Bei VPN-Netzen leer lassen – ein Tunnelnetz gehört beiden Seiten.', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='netze', to='inventar.standort'),
),
migrations.AlterField(
model_name='netz',
name='typ',
field=models.CharField(choices=[('transfer', 'Transfer'), ('lan', 'LAN'), ('vlan', 'VLAN'), ('vpn', 'VPN')], max_length=10),
),
migrations.AddConstraint(
model_name='netz',
constraint=models.UniqueConstraint(condition=models.Q(('standort__isnull', True)), fields=('cidr',), name='cidr_ohne_standort_eindeutig', violation_error_message='Dieses standortübergreifende Netz gibt es bereits.'),
),
]