From 9545e620b8e8d7369ff3f4bf5a7a5ef21ef9894c Mon Sep 17 00:00:00 2001 From: Ole Laursen Date: Thu, 1 Oct 2015 12:05:48 +0000 Subject: [PATCH] Summary: Add migration for renaming x3s3.3 to x3s3dot3 - Legacy-Id: 10113 --- .../migrations/0007_auto_20150930_0758.py | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 ietf/group/migrations/0007_auto_20150930_0758.py diff --git a/ietf/group/migrations/0007_auto_20150930_0758.py b/ietf/group/migrations/0007_auto_20150930_0758.py new file mode 100644 index 000000000..7409d1146 --- /dev/null +++ b/ietf/group/migrations/0007_auto_20150930_0758.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations + +def rename_x3s3dot3_forwards(apps, schema_editor): + Group = apps.get_model("group", "Group") + Group.objects.filter(acronym="x3s3.3").update(acronym="x3s3dot3") + +def rename_x3s3dot3_backwards(apps, schema_editor): + Group = apps.get_model("group", "Group") + Group.objects.filter(acronym="x3s3dot3").update(acronym="x3s3.3") + +class Migration(migrations.Migration): + + dependencies = [ + ('group', '0006_auto_20150718_0509'), + ] + + operations = [ + migrations.RunPython(rename_x3s3dot3_forwards, rename_x3s3dot3_backwards) + ]