diff options
Diffstat (limited to 'archaeological_finds/migrations')
| -rw-r--r-- | archaeological_finds/migrations/0075_auto__chg_field_find_container__chg_field_find_upstream_treatment__chg.py | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/archaeological_finds/migrations/0075_auto__chg_field_find_container__chg_field_find_upstream_treatment__chg.py b/archaeological_finds/migrations/0075_auto__chg_field_find_container__chg_field_find_upstream_treatment__chg.py index 61b85da41..600f7ca74 100644 --- a/archaeological_finds/migrations/0075_auto__chg_field_find_container__chg_field_find_upstream_treatment__chg.py +++ b/archaeological_finds/migrations/0075_auto__chg_field_find_container__chg_field_find_upstream_treatment__chg.py @@ -3,12 +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) # Changing field 'Find.container' db.alter_column('archaeological_finds_find', 'container_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, on_delete=models.SET_NULL, to=orm['archaeological_warehouse.Container'])) @@ -23,8 +28,16 @@ class Migration(SchemaMigration): # Changing field 'Find.collection' db.alter_column('archaeological_finds_find', 'collection_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, on_delete=models.SET_NULL, to=orm['archaeological_warehouse.Collection'])) + sql = FindUpstreamTreatments.CREATE_SQL + sql += FindDownstreamTreatments.CREATE_SQL + sql += FindTreatments.CREATE_SQL + db.execute(sql) def backwards(self, orm): + sql = FindTreatments.DELETE_SQL + sql += FindUpstreamTreatments.DELETE_SQL + sql += FindDownstreamTreatments.DELETE_SQL + db.execute(sql) # Changing field 'Find.container' db.alter_column('archaeological_finds_find', 'container_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, to=orm['archaeological_warehouse.Container'])) @@ -40,6 +53,10 @@ class Migration(SchemaMigration): # Changing field 'Find.collection' db.alter_column('archaeological_finds_find', 'collection_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, to=orm['archaeological_warehouse.Collection'])) + sql = FindUpstreamTreatments.CREATE_SQL + sql += FindDownstreamTreatments.CREATE_SQL + sql += FindTreatments.CREATE_SQL + db.execute(sql) models = { 'archaeological_context_records.activitytype': { |
