From 713fd6d8393d40c72db9e14872ad6d88933ad82a Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 10 Jan 2017 01:28:40 +0100 Subject: Fix find migration --- ...entfilesource__add_treatmentfile__add_unique_treatment.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/archaeological_finds/migrations/0013_auto__add_treatmentfilesource__add_treatmentfile__add_unique_treatment.py b/archaeological_finds/migrations/0013_auto__add_treatmentfilesource__add_treatmentfile__add_unique_treatment.py index fedb39be8..969dac2e6 100644 --- a/archaeological_finds/migrations/0013_auto__add_treatmentfilesource__add_treatmentfile__add_unique_treatment.py +++ b/archaeological_finds/migrations/0013_auto__add_treatmentfilesource__add_treatmentfile__add_unique_treatment.py @@ -3,11 +3,17 @@ import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models +from archaeological_finds.models_treatments import FindTreatments, \ + FindDownstreamTreatments, FindUpstreamTreatments class Migration(SchemaMigration): def forwards(self, orm): + sql = FindTreatments.DELETE_SQL + sql += FindUpstreamTreatments.DELETE_SQL + sql += FindDownstreamTreatments.DELETE_SQL + db.execute(sql) # Adding model 'TreatmentFileSource' db.create_table('archaeological_finds_treatmentfilesource', ( ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), @@ -329,6 +335,10 @@ class Migration(SchemaMigration): # Changing field 'Treatment.external_id' db.alter_column('archaeological_finds_treatment', 'external_id', self.gf('django.db.models.fields.CharField')(max_length=200, null=True)) + sql = FindUpstreamTreatments.CREATE_SQL + sql += FindDownstreamTreatments.CREATE_SQL + sql += FindTreatments.CREATE_SQL + db.execute(sql) def backwards(self, orm): # Removing unique constraint on 'TreatmentFile', fields ['year', 'index'] @@ -1638,4 +1648,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['archaeological_finds'] \ No newline at end of file + complete_apps = ['archaeological_finds'] -- cgit v1.2.3