Skip to content

Commit 9545e62

Browse files
committed
Summary: Add migration for renaming x3s3.3 to x3s3dot3
- Legacy-Id: 10113
1 parent 51e96e3 commit 9545e62

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# -*- coding: utf-8 -*-
2+
from __future__ import unicode_literals
3+
4+
from django.db import migrations
5+
6+
def rename_x3s3dot3_forwards(apps, schema_editor):
7+
Group = apps.get_model("group", "Group")
8+
Group.objects.filter(acronym="x3s3.3").update(acronym="x3s3dot3")
9+
10+
def rename_x3s3dot3_backwards(apps, schema_editor):
11+
Group = apps.get_model("group", "Group")
12+
Group.objects.filter(acronym="x3s3dot3").update(acronym="x3s3.3")
13+
14+
class Migration(migrations.Migration):
15+
16+
dependencies = [
17+
('group', '0006_auto_20150718_0509'),
18+
]
19+
20+
operations = [
21+
migrations.RunPython(rename_x3s3dot3_forwards, rename_x3s3dot3_backwards)
22+
]

0 commit comments

Comments
 (0)