diff options
-rw-r--r-- | archaeological_warehouse/migrations/0102_auto_20200324_1142.py | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/archaeological_warehouse/migrations/0102_auto_20200324_1142.py b/archaeological_warehouse/migrations/0102_auto_20200324_1142.py new file mode 100644 index 000000000..4006a9701 --- /dev/null +++ b/archaeological_warehouse/migrations/0102_auto_20200324_1142.py @@ -0,0 +1,100 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.27 on 2020-03-24 11:42 +from __future__ import unicode_literals + +from django.conf import settings +import django.contrib.gis.db.models.fields +import django.contrib.postgres.fields.jsonb +import django.contrib.postgres.search +from django.db import migrations, models +import django.db.models.deletion +import simple_history.models +import uuid + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('ishtar_common', '0202_auto_20200129_1941'), + ('archaeological_warehouse', '0101_squashed'), + ] + + operations = [ + migrations.CreateModel( + name='HistoricalWarehouse', + fields=[ + ('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')), + ('data', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default={})), + ('search_vector', django.contrib.postgres.search.SearchVectorField(blank=True, help_text='Auto filled at save', null=True, verbose_name='Search vector')), + ('qrcode', models.TextField(blank=True, max_length=255, null=True)), + ('x', models.FloatField(blank=True, null=True, verbose_name='X')), + ('y', models.FloatField(blank=True, null=True, verbose_name='Y')), + ('z', models.FloatField(blank=True, null=True, verbose_name='Z')), + ('estimated_error_x', models.FloatField(blank=True, null=True, verbose_name='Estimated error for X')), + ('estimated_error_y', models.FloatField(blank=True, null=True, verbose_name='Estimated error for Y')), + ('estimated_error_z', models.FloatField(blank=True, null=True, verbose_name='Estimated error for Z')), + ('point', django.contrib.gis.db.models.fields.PointField(blank=True, dim=3, null=True, srid=4326, verbose_name='Point')), + ('point_2d', django.contrib.gis.db.models.fields.PointField(blank=True, null=True, srid=4326, verbose_name='Point (2D)')), + ('point_source', models.CharField(blank=True, choices=[('T', 'Town'), ('P', 'Precise'), ('M', 'Polygon')], max_length=1, null=True, verbose_name='Point source')), + ('point_source_item', models.CharField(blank=True, max_length=100, null=True, verbose_name='Point source item')), + ('multi_polygon', django.contrib.gis.db.models.fields.MultiPolygonField(blank=True, null=True, srid=4326, verbose_name='Multi polygon')), + ('multi_polygon_source', models.CharField(blank=True, choices=[('T', 'Town'), ('P', 'Precise'), ('M', 'Polygon')], max_length=1, null=True, verbose_name='Multi-polygon source')), + ('multi_polygon_source_item', models.CharField(blank=True, max_length=100, null=True, verbose_name='Multi polygon source item')), + ('last_modified', models.DateTimeField(blank=True, editable=False)), + ('history_m2m', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default={})), + ('need_update', models.BooleanField(default=False, verbose_name='Need update')), + ('locked', models.BooleanField(default=False, verbose_name='Item locked for edition')), + ('address', models.TextField(blank=True, null=True, verbose_name='Address')), + ('address_complement', models.TextField(blank=True, null=True, verbose_name='Address complement')), + ('postal_code', models.CharField(blank=True, max_length=10, null=True, verbose_name='Postal code')), + ('town', models.CharField(blank=True, max_length=150, null=True, verbose_name='Town (freeform)')), + ('country', models.CharField(blank=True, max_length=30, null=True, verbose_name='Country')), + ('alt_address', models.TextField(blank=True, null=True, verbose_name='Other address: address')), + ('alt_address_complement', models.TextField(blank=True, null=True, verbose_name='Other address: address complement')), + ('alt_postal_code', models.CharField(blank=True, max_length=10, null=True, verbose_name='Other address: postal code')), + ('alt_town', models.CharField(blank=True, max_length=70, null=True, verbose_name='Other address: town')), + ('alt_country', models.CharField(blank=True, max_length=30, null=True, verbose_name='Other address: country')), + ('phone', models.CharField(blank=True, max_length=18, null=True, verbose_name='Phone')), + ('phone_desc', models.CharField(blank=True, max_length=300, null=True, verbose_name='Phone description')), + ('phone2', models.CharField(blank=True, max_length=18, null=True, verbose_name='Phone description 2')), + ('phone_desc2', models.CharField(blank=True, max_length=300, null=True, verbose_name='Phone description 2')), + ('phone3', models.CharField(blank=True, max_length=18, null=True, verbose_name='Phone 3')), + ('phone_desc3', models.CharField(blank=True, max_length=300, null=True, verbose_name='Phone description 3')), + ('raw_phone', models.TextField(blank=True, null=True, verbose_name='Raw phone')), + ('mobile_phone', models.CharField(blank=True, max_length=18, null=True, verbose_name='Mobile phone')), + ('email', models.EmailField(blank=True, max_length=300, null=True, verbose_name='Email')), + ('alt_address_is_prefered', models.BooleanField(default=False, verbose_name='Alternative address is prefered')), + ('uuid', models.UUIDField(default=uuid.uuid4)), + ('name', models.CharField(max_length=200, verbose_name='Name')), + ('comment', models.TextField(blank=True, null=True, verbose_name='Comment')), + ('external_id', models.TextField(blank=True, null=True, verbose_name='External ID')), + ('auto_external_id', models.BooleanField(default=False, verbose_name='External ID is set automatically')), + ('history_id', models.AutoField(primary_key=True, serialize=False)), + ('history_date', models.DateTimeField()), + ('history_change_reason', models.CharField(max_length=100, null=True)), + ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)), + ('history_creator', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL, verbose_name='Creator')), + ('history_modifier', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL, verbose_name='Last editor')), + ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)), + ('lock_user', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL, verbose_name='Locked by')), + ('main_image', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='ishtar_common.Document', verbose_name='Main image')), + ('organization', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='ishtar_common.Organization', verbose_name='Organization')), + ('person_in_charge', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='ishtar_common.Person', verbose_name='Person in charge')), + ('precise_town', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='ishtar_common.Town', verbose_name='Town (precise)')), + ('spatial_reference_system', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='ishtar_common.SpatialReferenceSystem', verbose_name='Spatial Reference System')), + ('warehouse_type', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='archaeological_warehouse.WarehouseType', verbose_name='Warehouse type')), + ], + options={ + 'verbose_name': 'historical Warehouse', + 'ordering': ('-history_date', '-history_id'), + 'get_latest_by': 'history_date', + }, + bases=(simple_history.models.HistoricalChanges, models.Model), + ), + migrations.AddField( + model_name='container', + name='parent', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='archaeological_warehouse.Container', verbose_name='Parent container'), + ), + ] |