From f106379b5382b2b82aa56466c8d3acaae58327a9 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 15 Jan 2013 21:29:30 -0600 Subject: Clean up and make several migrations modern This moves most migrations to the v2 format that have been presenting some issues. One missing depends_on relationship has been added, and we allow an index to not be dropped if it does not exist due to the shittyness in sqlite3 actually keeping indexes across DDL on that table. Signed-off-by: Dan McGee --- main/migrations/0005_fix_empty_url_pkgdesc.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'main/migrations/0005_fix_empty_url_pkgdesc.py') diff --git a/main/migrations/0005_fix_empty_url_pkgdesc.py b/main/migrations/0005_fix_empty_url_pkgdesc.py index c7cc1d8..54658c1 100644 --- a/main/migrations/0005_fix_empty_url_pkgdesc.py +++ b/main/migrations/0005_fix_empty_url_pkgdesc.py @@ -1,14 +1,11 @@ - +# -*- coding: utf-8 -*- from south.db import db +from south.v2 import DataMigration from django.db import models -from main.models import * -class Migration: +class Migration(DataMigration): - no_dry_run = True - def forwards(self, orm): - "Write your forwards migration here" for p in orm.Package.objects.filter(pkgdesc=''): p.pkgdesc = None p.save() @@ -24,7 +21,6 @@ class Migration: def backwards(self, orm): - "Write your backwards migration here" for p in orm.Package.objects.filter(pkgdesc=None): p.pkgdesc = '' p.save() -- cgit v1.2.3-24-g4f1b