From 1a59c85577011e2137b07d9a1871f123c92d50f6 Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Mon, 26 Mar 2018 17:38:39 +0200 Subject: [PATCH] Fix ordre des migrations --- .../{0052_switchs_machine.py => 0051_switchs_machine.py} | 5 +---- .../{0051_transferports.py => 0052_transferports.py} | 6 +++++- topologie/migrations/0053_finalsw.py | 5 ++++- 3 files changed, 10 insertions(+), 6 deletions(-) rename topologie/migrations/{0052_switchs_machine.py => 0051_switchs_machine.py} (91%) rename topologie/migrations/{0051_transferports.py => 0052_transferports.py} (85%) diff --git a/topologie/migrations/0052_switchs_machine.py b/topologie/migrations/0051_switchs_machine.py similarity index 91% rename from topologie/migrations/0052_switchs_machine.py rename to topologie/migrations/0051_switchs_machine.py index b32b3c18..d7f1da86 100644 --- a/topologie/migrations/0052_switchs_machine.py +++ b/topologie/migrations/0051_switchs_machine.py @@ -9,7 +9,7 @@ import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ - ('topologie', '0051_transferports'), + ('topologie', '0050_port_new_switch'), ] def transfer_sw(apps, schema_editor): @@ -36,7 +36,4 @@ class Migration(migrations.Migration): operations = [ migrations.RunPython(transfer_sw, untransfer_sw), - migrations.DeleteModel( - name='Switch', - ), ] diff --git a/topologie/migrations/0051_transferports.py b/topologie/migrations/0052_transferports.py similarity index 85% rename from topologie/migrations/0051_transferports.py rename to topologie/migrations/0052_transferports.py index 2a67e6be..88badbe6 100644 --- a/topologie/migrations/0051_transferports.py +++ b/topologie/migrations/0052_transferports.py @@ -8,7 +8,7 @@ from django.db import migrations class Migration(migrations.Migration): dependencies = [ - ('topologie', '0050_port_new_switch'), + ('topologie', '0051_switchs_machine'), ] def transfer_port(apps, schema_editor): @@ -24,6 +24,10 @@ class Migration(migrations.Migration): return operations = [ + migrations.AlterUniqueTogether( + name='port', + unique_together=set([]), + ), migrations.RunPython(transfer_port, untransfer_port), migrations.RemoveField( model_name='port', diff --git a/topologie/migrations/0053_finalsw.py b/topologie/migrations/0053_finalsw.py index 561e0dc3..2ed7e2ac 100644 --- a/topologie/migrations/0053_finalsw.py +++ b/topologie/migrations/0053_finalsw.py @@ -9,12 +9,15 @@ import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ - ('topologie', '0052_switchs_machine'), + ('topologie', '0052_transferports'), ] operations = [ + migrations.DeleteModel( + name='Switch', + ), migrations.RenameModel( old_name='NewSw', new_name='Switch',