diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-01-10 01:28:40 +0100 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-01-10 01:28:40 +0100 | 
| commit | 713fd6d8393d40c72db9e14872ad6d88933ad82a (patch) | |
| tree | 7802dbecc12975abc5192debb35311b5bf40a97a | |
| parent | 7475ae571619c3726e63c5cefc0215930cb83278 (diff) | |
| download | Ishtar-713fd6d8393d40c72db9e14872ad6d88933ad82a.tar.bz2 Ishtar-713fd6d8393d40c72db9e14872ad6d88933ad82a.zip  | |
Fix find migration
| -rw-r--r-- | archaeological_finds/migrations/0013_auto__add_treatmentfilesource__add_treatmentfile__add_unique_treatment.py | 12 | 
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']  | 
