diff options
Diffstat (limited to 'archaeological_operations/migrations/0101_squashed.py')
-rw-r--r-- | archaeological_operations/migrations/0101_squashed.py | 822 |
1 files changed, 822 insertions, 0 deletions
diff --git a/archaeological_operations/migrations/0101_squashed.py b/archaeological_operations/migrations/0101_squashed.py new file mode 100644 index 000000000..3b97094ce --- /dev/null +++ b/archaeological_operations/migrations/0101_squashed.py @@ -0,0 +1,822 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.27 on 2020-01-23 18:21 +from __future__ import unicode_literals + +import archaeological_operations.models +import datetime +from django.conf import settings +import django.contrib.gis.db.models.fields +import django.contrib.postgres.fields.jsonb +import django.contrib.postgres.indexes +import django.contrib.postgres.search +import django.core.validators +from django.db import migrations, models +import django.db.models.deletion +import ishtar_common.models +import re +import uuid + + +class Migration(migrations.Migration): + dependencies = [ + ('archaeological_files', '0101_squashed'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('ishtar_common', '0201_squashed'), + ('archaeological_finds', '0101_squashed'), + ('archaeological_operations', '0075_auto_20191216_1045'), + ] + + operations = [ + migrations.CreateModel( + name='OperationByDepartment', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ], + options={ + 'db_table': 'operation_department', + 'managed': False, + }, + ), + migrations.CreateModel( + name='ActType', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('label', models.TextField(verbose_name='Label')), + ('txt_idx', models.TextField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z', 32), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')], verbose_name='Textual ID')), + ('comment', models.TextField(blank=True, null=True, verbose_name='Comment')), + ('available', models.BooleanField(default=True, verbose_name='Available')), + ('intented_to', models.CharField(choices=[('F', 'Archaeological file'), ('O', 'Operation'), ('TF', 'Treatment request'), ('T', 'Treatment')], max_length=2, verbose_name='Intended to')), + ('code', models.CharField(blank=True, max_length=10, null=True, verbose_name='Code')), + ('indexed', models.BooleanField(default=False, verbose_name='Indexed')), + ('associated_template', models.ManyToManyField(blank=True, related_name='acttypes', to='ishtar_common.DocumentTemplate', verbose_name='Associated template')), + ], + options={ + 'verbose_name': 'Act type', + 'verbose_name_plural': 'Act types', + 'ordering': ('label',), + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='AdministrativeAct', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, 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')), + ('last_modified', models.DateTimeField(auto_now=True)), + ('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')), + ('index', models.IntegerField(blank=True, null=True, verbose_name='Index')), + ('signature_date', models.DateField(blank=True, null=True, verbose_name='Signature date')), + ('year', models.IntegerField(blank=True, null=True, verbose_name='Year')), + ('act_object', models.TextField(blank=True, max_length=300, null=True, verbose_name='Object')), + ('ref_sra', models.CharField(blank=True, max_length=15, null=True, verbose_name='Référence SRA')), + ('departments_label', models.TextField(blank=True, help_text='Cached values get from associated departments', null=True, verbose_name='Departments')), + ('towns_label', models.TextField(blank=True, help_text='Cached values get from associated towns', null=True, verbose_name='Towns')), + ('act_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='archaeological_operations.ActType', verbose_name='Act type')), + ('associated_file', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='administrative_act', to='archaeological_files.File', verbose_name='Archaeological file')), + ('history_creator', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL, verbose_name='Creator')), + ('history_modifier', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL, verbose_name='Last editor')), + ('imports', models.ManyToManyField(blank=True, related_name='imported_archaeological_operations_administrativeact', to='ishtar_common.Import')), + ('in_charge', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='adminact_operation_in_charge', to='ishtar_common.Person', verbose_name='Person in charge of the operation')), + ('lock_user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL, verbose_name='Locked by')), + ], + options={ + 'verbose_name': 'Administrative act', + 'verbose_name_plural': 'Administrative acts', + 'ordering': ('year', 'signature_date', 'index', 'act_type'), + 'permissions': (('view_administrativeact', 'Can view all Administrative acts'), ('view_own_administrativeact', 'Can view own Administrative act'), ('add_own_administrativeact', 'Can add own Administrative act'), ('change_own_administrativeact', 'Can change own Administrative act'), ('delete_own_administrativeact', 'Can delete own Administrative act')), + }, + bases=(ishtar_common.models.StatisticItem, ishtar_common.models.TemplateItem, models.Model, ishtar_common.models.CachedGen, ishtar_common.models.FixAssociated, ishtar_common.models.CascasdeUpdate, ishtar_common.models.OwnPerms, ishtar_common.models.ValueGetter), + ), + migrations.CreateModel( + name='ArchaeologicalSite', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, 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.ImageField(blank=True, max_length=255, null=True, upload_to=ishtar_common.models.get_image_path)), + ('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(auto_now=True)), + ('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')), + ('reference', models.CharField(max_length=200, unique=True, verbose_name='Reference')), + ('other_reference', models.TextField(blank=True, null=True, verbose_name='Other reference')), + ('name', models.CharField(blank=True, max_length=200, null=True, verbose_name='Name')), + ('comment', models.TextField(blank=True, null=True, verbose_name='Comment')), + ('locality_ngi', models.TextField(blank=True, null=True, verbose_name='National Geographic Institute locality')), + ('locality_cadastral', models.TextField(blank=True, null=True, verbose_name='Cadastral locality')), + ('shipwreck_name', models.TextField(blank=True, null=True, verbose_name='Shipwreck name')), + ('oceanographic_service_localisation', models.TextField(blank=True, null=True, verbose_name='Oceanographic service localisation')), + ('shipwreck_code', models.TextField(blank=True, null=True, verbose_name='Shipwreck code')), + ('sinking_date', models.DateField(blank=True, null=True, verbose_name='Sinking date')), + ('discovery_area', models.TextField(blank=True, null=True, verbose_name='Discovery area')), + ('affmar_number', models.CharField(blank=True, max_length=100, null=True, verbose_name='AffMar number')), + ('drassm_number', models.CharField(blank=True, max_length=100, null=True, verbose_name='DRASSM number')), + ('cached_label', models.TextField(blank=True, db_index=True, null=True, verbose_name='Cached name')), + ('cached_towns_label', models.TextField(blank=True, help_text='Generated automatically - do not edit', null=True, verbose_name='Cached town label')), + ('cached_periods', models.TextField(blank=True, help_text='Generated automatically - do not edit', null=True, verbose_name='Cached periods label')), + ('cached_remains', models.TextField(blank=True, help_text='Generated automatically - do not edit', null=True, verbose_name='Cached remains label')), + ('collaborators', models.ManyToManyField(blank=True, related_name='site_collaborator', to='ishtar_common.Person', verbose_name='Collaborators')), + ], + options={ + 'verbose_name': 'Archaeological site', + 'verbose_name_plural': 'Archaeological sites', + 'permissions': (('view_archaeologicalsite', 'Can view all Archaeological sites'), ('view_own_archaeologicalsite', 'Can view own Archaeological site'), ('add_own_archaeologicalsite', 'Can add own Archaeological site'), ('change_own_archaeologicalsite', 'Can change own Archaeological site'), ('delete_own_archaeologicalsite', 'Can delete own Archaeological site')), + }, + bases=(ishtar_common.models.DocumentItem, ishtar_common.models.StatisticItem, ishtar_common.models.TemplateItem, models.Model, ishtar_common.models.CachedGen, ishtar_common.models.FixAssociated, ishtar_common.models.CascasdeUpdate, ishtar_common.models.ImageContainerModel, ishtar_common.models.OwnPerms, ishtar_common.models.ValueGetter, ishtar_common.models.MainItem), + ), + migrations.CreateModel( + name='CulturalAttributionType', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('label', models.TextField(verbose_name='Label')), + ('txt_idx', models.TextField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z', 32), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')], verbose_name='Textual ID')), + ('comment', models.TextField(blank=True, null=True, verbose_name='Comment')), + ('available', models.BooleanField(default=True, verbose_name='Available')), + ('order', models.IntegerField(default=10, verbose_name='Order')), + ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='archaeological_operations.CulturalAttributionType', verbose_name='Parent')), + ], + options={ + 'verbose_name': 'Cultural attribution type', + 'verbose_name_plural': 'Cultural attribution types', + 'ordering': ('order',), + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='HistoricalAdministrativeAct', + 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')), + ('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')), + ('index', models.IntegerField(blank=True, null=True, verbose_name='Index')), + ('signature_date', models.DateField(blank=True, null=True, verbose_name='Signature date')), + ('year', models.IntegerField(blank=True, null=True, verbose_name='Year')), + ('act_object', models.TextField(blank=True, max_length=300, null=True, verbose_name='Object')), + ('ref_sra', models.CharField(blank=True, max_length=15, null=True, verbose_name='Référence SRA')), + ('departments_label', models.TextField(blank=True, help_text='Cached values get from associated departments', null=True, verbose_name='Departments')), + ('towns_label', models.TextField(blank=True, help_text='Cached values get from associated towns', null=True, verbose_name='Towns')), + ('history_id', models.AutoField(primary_key=True, serialize=False)), + ('history_date', models.DateTimeField()), + ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)), + ('act_type', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='archaeological_operations.ActType')), + ('associated_file', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='archaeological_files.File')), + ('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)), + ('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)), + ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)), + ('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')), + ('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)), + ], + options={ + 'verbose_name': 'historical Administrative act', + 'ordering': ('-history_date', '-history_id'), + 'get_latest_by': 'history_date', + }, + ), + migrations.CreateModel( + name='HistoricalArchaeologicalSite', + 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')), + ('reference', models.CharField(db_index=True, max_length=200, verbose_name='Reference')), + ('other_reference', models.TextField(blank=True, null=True, verbose_name='Other reference')), + ('name', models.CharField(blank=True, max_length=200, null=True, verbose_name='Name')), + ('comment', models.TextField(blank=True, null=True, verbose_name='Comment')), + ('locality_ngi', models.TextField(blank=True, null=True, verbose_name='National Geographic Institute locality')), + ('locality_cadastral', models.TextField(blank=True, null=True, verbose_name='Cadastral locality')), + ('shipwreck_name', models.TextField(blank=True, null=True, verbose_name='Shipwreck name')), + ('oceanographic_service_localisation', models.TextField(blank=True, null=True, verbose_name='Oceanographic service localisation')), + ('shipwreck_code', models.TextField(blank=True, null=True, verbose_name='Shipwreck code')), + ('sinking_date', models.DateField(blank=True, null=True, verbose_name='Sinking date')), + ('discovery_area', models.TextField(blank=True, null=True, verbose_name='Discovery area')), + ('affmar_number', models.CharField(blank=True, max_length=100, null=True, verbose_name='AffMar number')), + ('drassm_number', models.CharField(blank=True, max_length=100, null=True, verbose_name='DRASSM number')), + ('cached_label', models.TextField(blank=True, db_index=True, null=True, verbose_name='Cached name')), + ('cached_towns_label', models.TextField(blank=True, help_text='Generated automatically - do not edit', null=True, verbose_name='Cached town label')), + ('cached_periods', models.TextField(blank=True, help_text='Generated automatically - do not edit', null=True, verbose_name='Cached periods label')), + ('cached_remains', models.TextField(blank=True, help_text='Generated automatically - do not edit', null=True, verbose_name='Cached remains label')), + ('history_id', models.AutoField(primary_key=True, serialize=False)), + ('history_date', models.DateTimeField()), + ('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)), + ('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)), + ('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)), + ('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')), + ('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')), + ], + options={ + 'verbose_name': 'historical Archaeological site', + 'ordering': ('-history_date', '-history_id'), + 'get_latest_by': 'history_date', + }, + ), + migrations.CreateModel( + name='HistoricalOperation', + fields=[ + ('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')), + ('relation_image', models.TextField(blank=True, help_text='La taille maximale supportée pour le fichier est de 100 Mo.', max_length=100, null=True, verbose_name='Generated relation image (SVG)')), + ('relation_bitmap_image', models.TextField(blank=True, help_text='La taille maximale supportée pour le fichier est de 100 Mo.', max_length=100, null=True, verbose_name='Generated relation image (PNG)')), + ('relation_dot', models.TextField(blank=True, help_text='La taille maximale supportée pour le fichier est de 100 Mo.', max_length=100, null=True, verbose_name='Generated relation image (DOT)')), + ('relation_image_above', models.TextField(blank=True, help_text='La taille maximale supportée pour le fichier est de 100 Mo.', max_length=100, null=True, verbose_name='Generated above relation image (SVG)')), + ('relation_dot_above', models.TextField(blank=True, help_text='La taille maximale supportée pour le fichier est de 100 Mo.', max_length=100, null=True, verbose_name='Generated above relation image (DOT)')), + ('relation_bitmap_image_above', models.TextField(blank=True, help_text='La taille maximale supportée pour le fichier est de 100 Mo.', max_length=100, null=True, verbose_name='Generated above relation image (PNG)')), + ('relation_image_below', models.TextField(blank=True, help_text='La taille maximale supportée pour le fichier est de 100 Mo.', max_length=100, null=True, verbose_name='Generated below relation image (SVG)')), + ('relation_dot_below', models.TextField(blank=True, help_text='La taille maximale supportée pour le fichier est de 100 Mo.', max_length=100, null=True, verbose_name='Generated below relation image (DOT)')), + ('relation_bitmap_image_below', models.TextField(blank=True, help_text='La taille maximale supportée pour le fichier est de 100 Mo.', max_length=100, null=True, verbose_name='Generated below relation image (PNG)')), + ('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')), + ('uuid', models.UUIDField(default=uuid.uuid4)), + ('creation_date', models.DateField(default=datetime.date.today, verbose_name='Creation date')), + ('end_date', models.DateField(blank=True, null=True, verbose_name='Closing date')), + ('start_date', models.DateField(blank=True, null=True, verbose_name='Start date')), + ('excavation_end_date', models.DateField(blank=True, null=True, verbose_name='Excavation end date')), + ('report_delivery_date', models.DateField(blank=True, null=True, verbose_name='Report delivery date')), + ('year', models.IntegerField(blank=True, null=True, verbose_name='Year')), + ('operation_code', models.IntegerField(blank=True, null=True, verbose_name='Numeric reference')), + ('surface', models.IntegerField(blank=True, null=True, verbose_name='Surface (m2)')), + ('cost', models.IntegerField(blank=True, null=True, verbose_name='Cost (euros)')), + ('scheduled_man_days', models.IntegerField(blank=True, null=True, verbose_name='Scheduled man-days')), + ('optional_man_days', models.IntegerField(blank=True, null=True, verbose_name='Optional man-days')), + ('effective_man_days', models.IntegerField(blank=True, null=True, verbose_name='Effective man-days')), + ('old_code', models.CharField(blank=True, max_length=200, null=True, verbose_name='Old code')), + ('code_patriarche', models.TextField(blank=True, db_index=True, null=True, verbose_name='Code PATRIARCHE')), + ('fnap_financing', models.FloatField(blank=True, null=True, verbose_name='Financement FNAP (%)')), + ('fnap_cost', models.IntegerField(blank=True, null=True, verbose_name='Financement FNAP (€)')), + ('zoning_prescription', models.NullBooleanField(verbose_name='Prescription on zoning')), + ('large_area_prescription', models.NullBooleanField(verbose_name='Prescription on large area')), + ('geoarchaeological_context_prescription', models.NullBooleanField(verbose_name='Prescription on geoarchaeological context')), + ('negative_result', models.NullBooleanField(verbose_name='Résultat considéré comme négatif')), + ('cira_date', models.DateField(blank=True, null=True, verbose_name='Date avis CIRA')), + ('eas_number', models.CharField(blank=True, max_length=20, null=True, verbose_name="Numéro de l'EA")), + ('operator_reference', models.CharField(blank=True, max_length=20, null=True, verbose_name='Operator reference')), + ('common_name', models.TextField(blank=True, null=True, verbose_name='Generic name')), + ('address', models.TextField(blank=True, null=True, verbose_name='Address / Locality')), + ('comment', models.TextField(blank=True, null=True, verbose_name='Comment')), + ('scientific_documentation_comment', models.TextField(blank=True, null=True, verbose_name='Comment about scientific documentation')), + ('cached_label', models.CharField(blank=True, db_index=True, max_length=500, null=True, verbose_name='Cached name')), + ('virtual_operation', models.BooleanField(default=False, help_text='If checked, it means that this operation have not been officialy registered.', verbose_name='Virtual operation')), + ('abstract', models.TextField(blank=True, null=True, verbose_name='Abstract')), + ('documentation_deadline', models.DateField(blank=True, null=True, verbose_name='Deadline for submission of the documentation')), + ('documentation_received', models.NullBooleanField(verbose_name='Documentation received')), + ('finds_deadline', models.DateField(blank=True, null=True, verbose_name='Deadline for submission of the finds')), + ('finds_received', models.NullBooleanField(verbose_name='Finds received')), + ('drassm_code', models.CharField(blank=True, max_length=100, null=True, verbose_name='DRASSM code')), + ('seizure_name', models.TextField(blank=True, null=True, verbose_name='Seizure name')), + ('official_report_number', models.TextField(blank=True, null=True, verbose_name='Official report number')), + ('cached_towns_label', models.TextField(blank=True, help_text='Generated automatically - do not edit', null=True, verbose_name='Cached town label')), + ('cached_periods', models.TextField(blank=True, help_text='Generated automatically - do not edit', null=True, verbose_name='Cached periods label')), + ('cached_remains', models.TextField(blank=True, help_text='Generated automatically - do not edit', null=True, verbose_name='Cached remains label')), + ('history_id', models.AutoField(primary_key=True, serialize=False)), + ('history_date', models.DateTimeField()), + ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)), + ('applicant_authority', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='ishtar_common.Organization')), + ('associated_file', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='archaeological_files.File')), + ('cira_rapporteur', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='ishtar_common.Person')), + ('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)), + ('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)), + ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)), + ('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')), + ('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)), + ('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')), + ('minutes_writer', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='ishtar_common.Person')), + ('operation_type', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='ishtar_common.OperationType')), + ('operator', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='ishtar_common.Organization')), + ('protagonist', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='ishtar_common.Person')), + ], + options={ + 'verbose_name': 'historical Operation', + 'ordering': ('-history_date', '-history_id'), + 'get_latest_by': 'history_date', + }, + ), + migrations.CreateModel( + name='Operation', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('relation_image', models.FileField(blank=True, help_text='La taille maximale supportée pour le fichier est de 100 Mo.', null=True, upload_to=ishtar_common.models.get_image_path, verbose_name='Generated relation image (SVG)')), + ('relation_bitmap_image', models.FileField(blank=True, help_text='La taille maximale supportée pour le fichier est de 100 Mo.', null=True, upload_to=ishtar_common.models.get_image_path, verbose_name='Generated relation image (PNG)')), + ('relation_dot', models.FileField(blank=True, help_text='La taille maximale supportée pour le fichier est de 100 Mo.', null=True, upload_to=ishtar_common.models.get_image_path, verbose_name='Generated relation image (DOT)')), + ('relation_image_above', models.FileField(blank=True, help_text='La taille maximale supportée pour le fichier est de 100 Mo.', null=True, upload_to=ishtar_common.models.get_image_path, verbose_name='Generated above relation image (SVG)')), + ('relation_dot_above', models.FileField(blank=True, help_text='La taille maximale supportée pour le fichier est de 100 Mo.', null=True, upload_to=ishtar_common.models.get_image_path, verbose_name='Generated above relation image (DOT)')), + ('relation_bitmap_image_above', models.FileField(blank=True, help_text='La taille maximale supportée pour le fichier est de 100 Mo.', null=True, upload_to=ishtar_common.models.get_image_path, verbose_name='Generated above relation image (PNG)')), + ('relation_image_below', models.FileField(blank=True, help_text='La taille maximale supportée pour le fichier est de 100 Mo.', null=True, upload_to=ishtar_common.models.get_image_path, verbose_name='Generated below relation image (SVG)')), + ('relation_dot_below', models.FileField(blank=True, help_text='La taille maximale supportée pour le fichier est de 100 Mo.', null=True, upload_to=ishtar_common.models.get_image_path, verbose_name='Generated below relation image (DOT)')), + ('relation_bitmap_image_below', models.FileField(blank=True, help_text='La taille maximale supportée pour le fichier est de 100 Mo.', null=True, upload_to=ishtar_common.models.get_image_path, verbose_name='Generated below relation image (PNG)')), + ('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.ImageField(blank=True, max_length=255, null=True, upload_to=ishtar_common.models.get_image_path)), + ('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(auto_now=True)), + ('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')), + ('uuid', models.UUIDField(default=uuid.uuid4)), + ('creation_date', models.DateField(default=datetime.date.today, verbose_name='Creation date')), + ('end_date', models.DateField(blank=True, null=True, verbose_name='Closing date')), + ('start_date', models.DateField(blank=True, null=True, verbose_name='Start date')), + ('excavation_end_date', models.DateField(blank=True, null=True, verbose_name='Excavation end date')), + ('report_delivery_date', models.DateField(blank=True, null=True, verbose_name='Report delivery date')), + ('year', models.IntegerField(blank=True, null=True, verbose_name='Year')), + ('operation_code', models.IntegerField(blank=True, null=True, verbose_name='Numeric reference')), + ('surface', models.IntegerField(blank=True, null=True, verbose_name='Surface (m2)')), + ('cost', models.IntegerField(blank=True, null=True, verbose_name='Cost (euros)')), + ('scheduled_man_days', models.IntegerField(blank=True, null=True, verbose_name='Scheduled man-days')), + ('optional_man_days', models.IntegerField(blank=True, null=True, verbose_name='Optional man-days')), + ('effective_man_days', models.IntegerField(blank=True, null=True, verbose_name='Effective man-days')), + ('old_code', models.CharField(blank=True, max_length=200, null=True, verbose_name='Old code')), + ('code_patriarche', models.TextField(blank=True, null=True, unique=True, verbose_name='Code PATRIARCHE')), + ('fnap_financing', models.FloatField(blank=True, null=True, verbose_name='Financement FNAP (%)')), + ('fnap_cost', models.IntegerField(blank=True, null=True, verbose_name='Financement FNAP (€)')), + ('zoning_prescription', models.NullBooleanField(verbose_name='Prescription on zoning')), + ('large_area_prescription', models.NullBooleanField(verbose_name='Prescription on large area')), + ('geoarchaeological_context_prescription', models.NullBooleanField(verbose_name='Prescription on geoarchaeological context')), + ('negative_result', models.NullBooleanField(verbose_name='Résultat considéré comme négatif')), + ('cira_date', models.DateField(blank=True, null=True, verbose_name='Date avis CIRA')), + ('eas_number', models.CharField(blank=True, max_length=20, null=True, verbose_name="Numéro de l'EA")), + ('operator_reference', models.CharField(blank=True, max_length=20, null=True, verbose_name='Operator reference')), + ('common_name', models.TextField(blank=True, null=True, verbose_name='Generic name')), + ('address', models.TextField(blank=True, null=True, verbose_name='Address / Locality')), + ('comment', models.TextField(blank=True, null=True, verbose_name='Comment')), + ('scientific_documentation_comment', models.TextField(blank=True, null=True, verbose_name='Comment about scientific documentation')), + ('cached_label', models.CharField(blank=True, db_index=True, max_length=500, null=True, verbose_name='Cached name')), + ('virtual_operation', models.BooleanField(default=False, help_text='If checked, it means that this operation have not been officialy registered.', verbose_name='Virtual operation')), + ('abstract', models.TextField(blank=True, null=True, verbose_name='Abstract')), + ('documentation_deadline', models.DateField(blank=True, null=True, verbose_name='Deadline for submission of the documentation')), + ('documentation_received', models.NullBooleanField(verbose_name='Documentation received')), + ('finds_deadline', models.DateField(blank=True, null=True, verbose_name='Deadline for submission of the finds')), + ('finds_received', models.NullBooleanField(verbose_name='Finds received')), + ('drassm_code', models.CharField(blank=True, max_length=100, null=True, verbose_name='DRASSM code')), + ('seizure_name', models.TextField(blank=True, null=True, verbose_name='Seizure name')), + ('official_report_number', models.TextField(blank=True, null=True, verbose_name='Official report number')), + ('cached_towns_label', models.TextField(blank=True, help_text='Generated automatically - do not edit', null=True, verbose_name='Cached town label')), + ('cached_periods', models.TextField(blank=True, help_text='Generated automatically - do not edit', null=True, verbose_name='Cached periods label')), + ('cached_remains', models.TextField(blank=True, help_text='Generated automatically - do not edit', null=True, verbose_name='Cached remains label')), + ('applicant_authority', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='operation_applicant_authority', to='ishtar_common.Organization', verbose_name='Applicant authority')), + ('archaeological_sites', models.ManyToManyField(blank=True, related_name='operations', to='archaeological_operations.ArchaeologicalSite', verbose_name='Archaeological sites')), + ('associated_file', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='operations', to='archaeological_files.File', verbose_name='File')), + ('cira_rapporteur', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='cira_rapporteur', to='ishtar_common.Person', verbose_name='Rapporteur CIRA')), + ('collaborators', models.ManyToManyField(blank=True, related_name='operation_collaborator', to='ishtar_common.Person', verbose_name='Collaborators')), + ('documents', models.ManyToManyField(blank=True, related_name='operations', to='ishtar_common.Document', verbose_name='Documents')), + ('history_creator', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL, verbose_name='Creator')), + ('history_modifier', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL, verbose_name='Last editor')), + ('imports', models.ManyToManyField(blank=True, related_name='imported_archaeological_operations_operation', to='ishtar_common.Import')), + ('in_charge', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='operation_responsability', to='ishtar_common.Person', verbose_name='In charge')), + ('lock_user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL, verbose_name='Locked by')), + ('main_image', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='main_image_operations', to='ishtar_common.Document', verbose_name='Main image')), + ('minutes_writer', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='minutes_writer', to='ishtar_common.Person', verbose_name='Writer of the minutes')), + ('operation_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='ishtar_common.OperationType', verbose_name='Operation type')), + ('operator', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='operator', to='ishtar_common.Organization', verbose_name='Operator')), + ], + options={ + 'verbose_name': 'Operation', + 'verbose_name_plural': 'Operations', + 'ordering': ('cached_label',), + 'permissions': (('view_operation', 'Can view all Operations'), ('view_own_operation', 'Can view own Operation'), ('add_own_operation', 'Can add own Operation'), ('change_own_operation', 'Can change own Operation'), ('delete_own_operation', 'Can delete own Operation'), ('close_operation', 'Can close Operation')), + }, + bases=(archaeological_operations.models.ClosedItem, ishtar_common.models.DocumentItem, ishtar_common.models.StatisticItem, ishtar_common.models.TemplateItem, ishtar_common.models.OwnPerms, ishtar_common.models.ValueGetter, ishtar_common.models.MainItem, ishtar_common.models.DashboardFormItem, models.Model, ishtar_common.models.CachedGen, ishtar_common.models.FixAssociated, ishtar_common.models.CascasdeUpdate, ishtar_common.models.ImageContainerModel), + ), + migrations.CreateModel( + name='OperationTypeOld', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('label', models.TextField(verbose_name='Label')), + ('txt_idx', models.TextField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z', 32), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')], verbose_name='Textual ID')), + ('comment', models.TextField(blank=True, null=True, verbose_name='Comment')), + ('available', models.BooleanField(default=True, verbose_name='Available')), + ('order', models.IntegerField(default=1, verbose_name='Order')), + ('preventive', models.BooleanField(default=True, verbose_name='Is preventive')), + ], + options={ + 'verbose_name': 'Operation type old', + 'verbose_name_plural': 'Operation types old', + 'ordering': ['-preventive', 'order', 'label'], + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='Parcel', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, 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')), + ('last_modified', models.DateTimeField(auto_now=True)), + ('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')), + ('history_date', models.DateTimeField(default=datetime.datetime.now)), + ('uuid', models.UUIDField(default=uuid.uuid4)), + ('year', models.IntegerField(blank=True, null=True, verbose_name='Year')), + ('section', models.CharField(blank=True, max_length=4, null=True, verbose_name='Section')), + ('parcel_number', models.CharField(blank=True, max_length=6, null=True, verbose_name='Parcel number')), + ('public_domain', models.BooleanField(default=False, verbose_name='Public domain')), + ('external_id', models.CharField(blank=True, max_length=100, null=True, verbose_name='External ID')), + ('auto_external_id', models.BooleanField(default=False, verbose_name='External ID is set automatically')), + ('address', models.TextField(blank=True, null=True, verbose_name='Address - Locality')), + ('cached_label', models.TextField(blank=True, db_index=True, null=True, verbose_name='Cached name')), + ('associated_file', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='parcels', to='archaeological_files.File', verbose_name='File')), + ('history_creator', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL, verbose_name='Creator')), + ('history_modifier', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL, verbose_name='Last editor')), + ('imports', models.ManyToManyField(blank=True, related_name='imported_archaeological_operations_parcel', to='ishtar_common.Import')), + ('lock_user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL, verbose_name='Locked by')), + ('operation', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='parcels', to='archaeological_operations.Operation', verbose_name='Operation')), + ('town', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='parcels', to='ishtar_common.Town', verbose_name='Town')), + ], + options={ + 'verbose_name': 'Parcel', + 'verbose_name_plural': 'Parcels', + 'ordering': ('year', 'section', 'parcel_number'), + }, + bases=(ishtar_common.models.StatisticItem, ishtar_common.models.TemplateItem, models.Model, ishtar_common.models.CachedGen, ishtar_common.models.FixAssociated, ishtar_common.models.CascasdeUpdate), + ), + migrations.CreateModel( + name='ParcelOwner', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, 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')), + ('last_modified', models.DateTimeField(auto_now=True)), + ('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')), + ('history_date', models.DateTimeField(default=datetime.datetime.now)), + ('uuid', models.UUIDField(default=uuid.uuid4)), + ('start_date', models.DateField(verbose_name='Start date')), + ('end_date', models.DateField(verbose_name='End date')), + ('history_creator', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL, verbose_name='Creator')), + ('history_modifier', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL, verbose_name='Last editor')), + ('imports', models.ManyToManyField(blank=True, related_name='imported_archaeological_operations_parcelowner', to='ishtar_common.Import')), + ('lock_user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL, verbose_name='Locked by')), + ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='parcel_owner', to='ishtar_common.Person', verbose_name='Owner')), + ('parcel', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='owners', to='archaeological_operations.Parcel', verbose_name='Parcel')), + ], + options={ + 'verbose_name': 'Parcel owner', + 'verbose_name_plural': 'Parcel owners', + }, + bases=(ishtar_common.models.StatisticItem, ishtar_common.models.TemplateItem, models.Model, ishtar_common.models.CachedGen, ishtar_common.models.FixAssociated, ishtar_common.models.CascasdeUpdate), + ), + migrations.CreateModel( + name='Period', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('label', models.TextField(verbose_name='Label')), + ('txt_idx', models.TextField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z', 32), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')], verbose_name='Textual ID')), + ('comment', models.TextField(blank=True, null=True, verbose_name='Comment')), + ('available', models.BooleanField(default=True, verbose_name='Available')), + ('order', models.IntegerField(verbose_name='Order')), + ('start_date', models.IntegerField(blank=True, null=True, verbose_name='Start date')), + ('end_date', models.IntegerField(blank=True, null=True, verbose_name='End date')), + ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='archaeological_operations.Period', verbose_name='Parent period')), + ], + options={ + 'verbose_name': 'Type Period', + 'verbose_name_plural': 'Types Period', + 'ordering': ('order',), + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='RecordQualityType', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('label', models.TextField(verbose_name='Label')), + ('txt_idx', models.TextField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z', 32), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')], verbose_name='Textual ID')), + ('comment', models.TextField(blank=True, null=True, verbose_name='Comment')), + ('available', models.BooleanField(default=True, verbose_name='Available')), + ('order', models.IntegerField(verbose_name='Order')), + ], + options={ + 'verbose_name': 'Type of record quality', + 'verbose_name_plural': 'Types of record quality', + 'ordering': ('order',), + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='RecordRelations', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('left_record', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='right_relations', to='archaeological_operations.Operation')), + ], + options={ + 'verbose_name': 'Operation record relation', + 'verbose_name_plural': 'Operation record relations', + 'ordering': ('left_record', 'relation_type'), + 'permissions': [('view_operationrelation', 'Can view all Operation relations')], + }, + bases=(ishtar_common.models.GeneralRecordRelations, models.Model), + ), + migrations.CreateModel( + name='RelationType', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('label', models.TextField(verbose_name='Label')), + ('txt_idx', models.TextField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z', 32), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')], verbose_name='Textual ID')), + ('comment', models.TextField(blank=True, null=True, verbose_name='Comment')), + ('available', models.BooleanField(default=True, verbose_name='Available')), + ('order', models.IntegerField(default=1, verbose_name='Order')), + ('symmetrical', models.BooleanField(verbose_name='Symmetrical')), + ('tiny_label', models.CharField(blank=True, max_length=50, null=True, verbose_name='Tiny label')), + ('logical_relation', models.CharField(blank=True, choices=[('above', 'Above'), ('below', 'Below'), ('equal', 'Equal')], max_length=10, null=True, verbose_name='Logical relation')), + ('inverse_relation', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='archaeological_operations.RelationType', verbose_name='Inverse relation')), + ], + options={ + 'verbose_name': 'Operation relation type', + 'verbose_name_plural': 'Operation relation types', + 'ordering': ('order', 'label'), + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='RemainType', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('label', models.TextField(verbose_name='Label')), + ('txt_idx', models.TextField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z', 32), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')], verbose_name='Textual ID')), + ('comment', models.TextField(blank=True, null=True, verbose_name='Comment')), + ('available', models.BooleanField(default=True, verbose_name='Available')), + ], + options={ + 'verbose_name': 'Remain type', + 'verbose_name_plural': 'Remain types', + 'ordering': ('label',), + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='ReportState', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('label', models.TextField(verbose_name='Label')), + ('txt_idx', models.TextField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z', 32), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')], verbose_name='Textual ID')), + ('comment', models.TextField(blank=True, null=True, verbose_name='Comment')), + ('available', models.BooleanField(default=True, verbose_name='Available')), + ('order', models.IntegerField(verbose_name='Order')), + ], + options={ + 'verbose_name': 'Type of report state', + 'verbose_name_plural': 'Types of report state', + 'ordering': ('order',), + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.AddField( + model_name='recordrelations', + name='relation_type', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='archaeological_operations.RelationType'), + ), + migrations.AddField( + model_name='recordrelations', + name='right_record', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='left_relations', to='archaeological_operations.Operation'), + ), + migrations.AddField( + model_name='operation', + name='periods', + field=models.ManyToManyField(blank=True, to='archaeological_operations.Period', verbose_name='Periods'), + ), + migrations.AddField( + model_name='operation', + name='protagonist', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='operation_protagonist', to='ishtar_common.Person', verbose_name='Name of the protagonist'), + ), + migrations.AddField( + model_name='operation', + name='record_quality_type', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='archaeological_operations.RecordQualityType', verbose_name='Record quality'), + ), + migrations.AddField( + model_name='operation', + name='remains', + field=models.ManyToManyField(blank=True, to='archaeological_operations.RemainType', verbose_name='Remains'), + ), + migrations.AddField( + model_name='operation', + name='report_processing', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='archaeological_operations.ReportState', verbose_name='Report processing'), + ), + migrations.AddField( + model_name='operation', + name='scientist', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='operation_scientist_responsability', to='ishtar_common.Person', verbose_name='In charge scientist'), + ), + migrations.AddField( + model_name='operation', + name='spatial_reference_system', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='ishtar_common.SpatialReferenceSystem', verbose_name='Spatial Reference System'), + ), + migrations.AddField( + model_name='operation', + name='top_sites', + field=models.ManyToManyField(blank=True, related_name='top_operations', to='archaeological_operations.ArchaeologicalSite', verbose_name='Sites for which this operation is top operation'), + ), + migrations.AddField( + model_name='operation', + name='towns', + field=models.ManyToManyField(related_name='operations', to='ishtar_common.Town', verbose_name='Towns'), + ), + migrations.AddField( + model_name='historicaloperation', + name='record_quality_type', + field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='archaeological_operations.RecordQualityType'), + ), + migrations.AddField( + model_name='historicaloperation', + name='report_processing', + field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='archaeological_operations.ReportState'), + ), + migrations.AddField( + model_name='historicaloperation', + name='scientist', + field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='ishtar_common.Person'), + ), + migrations.AddField( + model_name='historicaloperation', + name='spatial_reference_system', + field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='ishtar_common.SpatialReferenceSystem'), + ), + migrations.AddField( + model_name='historicaladministrativeact', + name='operation', + field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='archaeological_operations.Operation'), + ), + migrations.AddField( + model_name='historicaladministrativeact', + name='operator', + field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='ishtar_common.Organization'), + ), + migrations.AddField( + model_name='historicaladministrativeact', + name='scientist', + field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='ishtar_common.Person'), + ), + migrations.AddField( + model_name='historicaladministrativeact', + name='signatory', + field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='ishtar_common.Person'), + ), + migrations.AddField( + model_name='archaeologicalsite', + name='cultural_attributions', + field=models.ManyToManyField(blank=True, to='archaeological_operations.CulturalAttributionType', verbose_name='Cultural attribution'), + ), + migrations.AddField( + model_name='archaeologicalsite', + name='documents', + field=models.ManyToManyField(blank=True, related_name='sites', to='ishtar_common.Document', verbose_name='Documents'), + ), + migrations.AddField( + model_name='archaeologicalsite', + name='history_creator', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL, verbose_name='Creator'), + ), + migrations.AddField( + model_name='archaeologicalsite', + name='history_modifier', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL, verbose_name='Last editor'), + ), + migrations.AddField( + model_name='archaeologicalsite', + name='imports', + field=models.ManyToManyField(blank=True, related_name='imported_archaeological_operations_archaeologicalsite', to='ishtar_common.Import'), + ), + migrations.AddField( + model_name='archaeologicalsite', + name='lock_user', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL, verbose_name='Locked by'), + ), + migrations.AddField( + model_name='archaeologicalsite', + name='main_image', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='main_image_sites', to='ishtar_common.Document', verbose_name='Main image'), + ), + migrations.AddField( + model_name='archaeologicalsite', + name='periods', + field=models.ManyToManyField(blank=True, to='archaeological_operations.Period', verbose_name='Periods'), + ), + migrations.AddField( + model_name='archaeologicalsite', + name='remains', + field=models.ManyToManyField(blank=True, to='archaeological_operations.RemainType', verbose_name='Remains'), + ), + migrations.AddField( + model_name='archaeologicalsite', + name='spatial_reference_system', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='ishtar_common.SpatialReferenceSystem', verbose_name='Spatial Reference System'), + ), + migrations.AddField( + model_name='archaeologicalsite', + name='towns', + field=models.ManyToManyField(blank=True, related_name='sites', to='ishtar_common.Town', verbose_name='Towns'), + ), + migrations.AddField( + model_name='administrativeact', + name='operation', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='administrative_act', to='archaeological_operations.Operation', verbose_name='Operation'), + ), + migrations.AddField( + model_name='administrativeact', + name='operator', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='adminact_operator', to='ishtar_common.Organization', verbose_name='Archaeological preventive operator'), + ), + migrations.AddField( + model_name='administrativeact', + name='scientist', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='adminact_scientist', to='ishtar_common.Person', verbose_name='Scientist in charge'), + ), + migrations.AddField( + model_name='administrativeact', + name='signatory', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='signatory', to='ishtar_common.Person', verbose_name='Signatory'), + ), + migrations.AddIndex( + model_name='parcelowner', + index=django.contrib.postgres.indexes.GinIndex(fields=['data'], name='archaeologi_data_457021_gin'), + ), + migrations.AddIndex( + model_name='parcel', + index=django.contrib.postgres.indexes.GinIndex(fields=['data'], name='archaeologi_data_835f5e_gin'), + ), + migrations.AddIndex( + model_name='operation', + index=django.contrib.postgres.indexes.GinIndex(fields=['data'], name='archaeologi_data_8d8f9f_gin'), + ), + migrations.AddIndex( + model_name='archaeologicalsite', + index=django.contrib.postgres.indexes.GinIndex(fields=['data'], name='archaeologi_data_071fb5_gin'), + ), + migrations.AddIndex( + model_name='administrativeact', + index=django.contrib.postgres.indexes.GinIndex(fields=['data'], name='archaeologi_data_587bb3_gin'), + ), + ] |