Add south migrations #27

Closed
dokterbob opened this Issue Sep 4, 2012 · 4 comments

Projects

None yet

2 participants

@dokterbob
Owner

No description provided.

@garromark

As an extension of this, trying to prepare my own initial migration fails:

./manage.py schemamigration newsletter --initial

@garromark

I was able to create initial migrations by temporarily modifying:

def get_next_order():
sib_order__max = Article.objects.aggregate(models.Max('sortorder'))['sortorder__max']
if sib_order__max:
return sib_order__max + 10
else:
return 10

to say:

def get_next_order():
return 10

These initial migrations can be included with the project.

@dokterbob
Owner

Hey Garromak,

Thanks! I am going remove the templates from the database into the
filesystem - after this I'll use advice in creating the migration. ^^

Cheers!
M

Op 17-09-12 22:45, garromark schreef:

I was able to create initial migrations by temporarily modifying:

def get/next_order():
sib_order//max =
Article.objects.aggregate(models.Max('sortorder'))['sortorder//max']
if sib_order//max:
return sib_order/_max + 10
else:
return 10

to say:

def get_next_order():
return 10

These initial migrations can be included with the project.


Reply to this email directly or view it on GitHub
#27 (comment).

@dokterbob
Owner

Somehow, turned out that South handled this without problems. Well-tested and thus: migrations are in django-newsletter now. Thanks for the feedback!

@dokterbob dokterbob closed this Nov 19, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment