Run migrations! Added new migrations to new database.

This commit is contained in:
Griatch 2015-01-18 18:04:13 +01:00
parent 07087af395
commit 73a3f1b03e
6 changed files with 89 additions and 25 deletions

View file

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def convert_defaults(apps, schema_editor):
ChannelDB = apps.get_model("comms", "ChannelDB")
for channel in ChannelDB.objects.filter(db_typeclass_path="src.comms.comms.Channel"):
channel.db_typeclass_path = "typeclasses.channels.Channel"
channel.save()
class Migration(migrations.Migration):
dependencies = [
('comms', '0004_defaultchannel'),
]
operations = [
migrations.RunPython(convert_defaults),
]