From cc9fc62ab905367a741a280f1b054319d75d2e25 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Mon, 28 Mar 2016 17:10:15 -0400 Subject: [PATCH] Added parent field to device modules --- .../migrations/0004_auto_20160328_2109.py | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 netbox/dcim/migrations/0004_auto_20160328_2109.py diff --git a/netbox/dcim/migrations/0004_auto_20160328_2109.py b/netbox/dcim/migrations/0004_auto_20160328_2109.py new file mode 100644 index 000000000..7928e6586 --- /dev/null +++ b/netbox/dcim/migrations/0004_auto_20160328_2109.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.1 on 2016-03-28 21:09 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('dcim', '0003_auto_20160304_1642'), + ] + + operations = [ + migrations.AlterModelOptions( + name='module', + options={'ordering': ['device', 'parent', 'name']}, + ), + migrations.AddField( + model_name='module', + name='parent', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='submodules', to='dcim.Module'), + ), + migrations.AlterUniqueTogether( + name='module', + unique_together=set([('device', 'parent', 'name')]), + ), + ]