summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archaeological_finds/migrations/0013_auto__add_treatmentfilesource__add_treatmentfile__add_unique_treatment.py12
1 files changed, 11 insertions, 1 deletions
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']