Skip to content
Snippets Groups Projects
Commit 0af62c68 authored by Branson Craig Stephens's avatar Branson Craig Stephens
Browse files

Fixed migration of existing eels.

parent 57a854c3
No related branches found
No related tags found
No related merge requests found
......@@ -7,13 +7,20 @@ from django.db import models
class Migration(DataMigration):
def forwards(self, orm):
"Write your forwards methods here."
# Note: Don't use "from appname.models import ModelName".
# Use orm.ModelName to refer to models in this application,
# and orm['appname.ModelName'] for models in other applications.
for eel in orm.EMBBEventLog.objects.all():
if not eel.raList:
# Assume that the list values are unset, because this is an old eel.
# For eels with only one footprint, the list fields should just have
# a string-ified version of the single value.
eel.raList = str(eel.ra)
eel.decList = str(eel.dec)
eel.raWidthList = str(eel.raWidth)
eel.gpstimeList = str(eel.gpstime)
eel.decWidthList = str(eel.decWidth)
eel.durationList = str(eel.duration)
def backwards(self, orm):
"Write your backwards methods here."
pass
models = {
u'auth.group': {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment