diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2020-01-27 18:21:55 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2020-07-01 18:01:59 +0200 |
commit | 5ba93360a8f444141dcc2f512eda84e813fca364 (patch) | |
tree | ac58e393f88bd034eb8108905a7a43cc6c5498f6 /archaeological_context_records | |
parent | 3092612f54ecaba7ede5e5564f40ac36e873dd67 (diff) | |
download | Ishtar-5ba93360a8f444141dcc2f512eda84e813fca364.tar.bz2 Ishtar-5ba93360a8f444141dcc2f512eda84e813fca364.zip |
Pseudo-squash of migrations - use Makefile script for migrations
Diffstat (limited to 'archaeological_context_records')
-rw-r--r-- | archaeological_context_records/migrations/0101_squashed.py | 343 | ||||
-rw-r--r-- | archaeological_context_records/migrations/0102_link_apps.py | 195 |
2 files changed, 538 insertions, 0 deletions
diff --git a/archaeological_context_records/migrations/0101_squashed.py b/archaeological_context_records/migrations/0101_squashed.py new file mode 100644 index 000000000..911e4d47a --- /dev/null +++ b/archaeological_context_records/migrations/0101_squashed.py @@ -0,0 +1,343 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.27 on 2020-01-23 18:21 +from __future__ import unicode_literals + +import django.contrib.gis.db.models.fields +import django.contrib.postgres.fields.jsonb +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_context_records', '0056_auto_20191216_1031'), + ] + + operations = [ + migrations.CreateModel( + name='RecordRelationView', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ], + options={ + 'db_table': 'record_relations', + 'permissions': [('view_recordrelation', 'Can view all record relations - view')], + 'managed': False, + }, + ), + migrations.CreateModel( + name='ActivityType', + 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': 'Activity Type', + 'verbose_name_plural': 'Activity Types', + 'ordering': ('order',), + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='ContextRecord', + 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)), + ('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')), + ('label', models.CharField(max_length=200, verbose_name='ID')), + ('description', models.TextField(blank=True, null=True, verbose_name='Description')), + ('comment', models.TextField(blank=True, null=True, verbose_name='General comment')), + ('opening_date', models.DateField(blank=True, null=True, verbose_name='Opening date')), + ('closing_date', models.DateField(blank=True, null=True, verbose_name='Closing date')), + ('length', models.FloatField(blank=True, null=True, verbose_name='Length (m)')), + ('width', models.FloatField(blank=True, null=True, verbose_name='Width (m)')), + ('thickness', models.FloatField(blank=True, null=True, verbose_name='Thickness (m)')), + ('diameter', models.FloatField(blank=True, null=True, verbose_name='Diameter (m)')), + ('depth', models.FloatField(blank=True, null=True, verbose_name='Depth (m)')), + ('depth_of_appearance', models.FloatField(blank=True, null=True, verbose_name='Depth of appearance (m)')), + ('location', models.TextField(blank=True, help_text='A short description of the location of the context record', null=True, verbose_name='Location')), + ('datings_comment', models.TextField(blank=True, null=True, verbose_name='Comment on datings')), + ('filling', models.TextField(blank=True, null=True, verbose_name='Filling')), + ('interpretation', models.TextField(blank=True, null=True, verbose_name='Interpretation')), + ('taq', models.IntegerField(blank=True, help_text='"Terminus Ante Quem" the context record can\'t have been created after this date', null=True, verbose_name='TAQ')), + ('taq_estimated', models.IntegerField(blank=True, help_text='Estimation of a "Terminus Ante Quem"', null=True, verbose_name='Estimated TAQ')), + ('tpq', models.IntegerField(blank=True, help_text='"Terminus Post Quem" the context record can\'t have been created before this date', null=True, verbose_name='TPQ')), + ('tpq_estimated', models.IntegerField(blank=True, help_text='Estimation of a "Terminus Post Quem"', null=True, verbose_name='Estimated TPQ')), + ('cached_label', models.TextField(blank=True, db_index=True, null=True, verbose_name='Cached name')), + ('cached_periods', models.TextField(blank=True, help_text='Generated automatically - do not edit', null=True, verbose_name='Cached periods label')), + ('cached_related_context_records', models.TextField(blank=True, help_text='Generated automatically - do not edit', null=True, verbose_name='Cached related context records')), + ], + options={ + 'verbose_name': 'Context Record', + 'verbose_name_plural': 'Context Record', + 'ordering': ('cached_label',), + 'permissions': (('view_contextrecord', 'Can view all Context Records'), ('view_own_contextrecord', 'Can view own Context Record'), ('add_own_contextrecord', 'Can add own Context Record'), ('change_own_contextrecord', 'Can change own Context Record'), ('delete_own_contextrecord', 'Can delete own Context Record')), + }, + bases=(ishtar_common.models.BulkUpdatedItem, ishtar_common.models.DocumentItem, ishtar_common.models.StatisticItem, ishtar_common.models.TemplateItem, ishtar_common.models.OwnPerms, ishtar_common.models.ValueGetter, ishtar_common.models.MainItem, models.Model, ishtar_common.models.CachedGen, ishtar_common.models.FixAssociated, ishtar_common.models.CascasdeUpdate, ishtar_common.models.ImageContainerModel), + ), + migrations.CreateModel( + name='Dating', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('uuid', models.UUIDField(default=uuid.uuid4)), + ('start_date', models.IntegerField(blank=True, null=True, verbose_name='Start date')), + ('end_date', models.IntegerField(blank=True, null=True, verbose_name='End date')), + ('precise_dating', models.TextField(blank=True, null=True, verbose_name='Precise dating')), + ], + options={ + 'verbose_name': 'Dating', + 'verbose_name_plural': 'Datings', + }, + ), + migrations.CreateModel( + name='DatingQuality', + 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': 'Dating quality type', + 'verbose_name_plural': 'Dating quality types', + 'ordering': ('label',), + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='DatingType', + 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': 'Dating type', + 'verbose_name_plural': 'Dating types', + 'ordering': ('label',), + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='DocumentationType', + 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': 'Documentation type', + 'verbose_name_plural': 'Documentation types', + 'ordering': ('label',), + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='ExcavationTechnicType', + 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': 'Excavation technique type', + 'verbose_name_plural': 'Excavation technique types', + 'ordering': ('label',), + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='HistoricalContextRecord', + 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)), + ('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')), + ('label', models.CharField(max_length=200, verbose_name='ID')), + ('description', models.TextField(blank=True, null=True, verbose_name='Description')), + ('comment', models.TextField(blank=True, null=True, verbose_name='General comment')), + ('opening_date', models.DateField(blank=True, null=True, verbose_name='Opening date')), + ('closing_date', models.DateField(blank=True, null=True, verbose_name='Closing date')), + ('length', models.FloatField(blank=True, null=True, verbose_name='Length (m)')), + ('width', models.FloatField(blank=True, null=True, verbose_name='Width (m)')), + ('thickness', models.FloatField(blank=True, null=True, verbose_name='Thickness (m)')), + ('diameter', models.FloatField(blank=True, null=True, verbose_name='Diameter (m)')), + ('depth', models.FloatField(blank=True, null=True, verbose_name='Depth (m)')), + ('depth_of_appearance', models.FloatField(blank=True, null=True, verbose_name='Depth of appearance (m)')), + ('location', models.TextField(blank=True, help_text='A short description of the location of the context record', null=True, verbose_name='Location')), + ('datings_comment', models.TextField(blank=True, null=True, verbose_name='Comment on datings')), + ('filling', models.TextField(blank=True, null=True, verbose_name='Filling')), + ('interpretation', models.TextField(blank=True, null=True, verbose_name='Interpretation')), + ('taq', models.IntegerField(blank=True, help_text='"Terminus Ante Quem" the context record can\'t have been created after this date', null=True, verbose_name='TAQ')), + ('taq_estimated', models.IntegerField(blank=True, help_text='Estimation of a "Terminus Ante Quem"', null=True, verbose_name='Estimated TAQ')), + ('tpq', models.IntegerField(blank=True, help_text='"Terminus Post Quem" the context record can\'t have been created before this date', null=True, verbose_name='TPQ')), + ('tpq_estimated', models.IntegerField(blank=True, help_text='Estimation of a "Terminus Post Quem"', null=True, verbose_name='Estimated TPQ')), + ('cached_label', models.TextField(blank=True, db_index=True, null=True, verbose_name='Cached name')), + ('cached_periods', models.TextField(blank=True, help_text='Generated automatically - do not edit', null=True, verbose_name='Cached periods label')), + ('cached_related_context_records', models.TextField(blank=True, help_text='Generated automatically - do not edit', null=True, verbose_name='Cached related context records')), + ('history_id', models.AutoField(primary_key=True, serialize=False)), + ('history_date', models.DateTimeField()), + ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)), + ('activity', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='archaeological_context_records.ActivityType')), + ], + options={ + 'verbose_name': 'historical Context Record', + 'ordering': ('-history_date', '-history_id'), + 'get_latest_by': 'history_date', + }, + ), + migrations.CreateModel( + name='IdentificationType', + 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': 'Identification Type', + 'verbose_name_plural': 'Identification Types', + 'ordering': ('order', 'label'), + }, + 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_context_records.ContextRecord')), + ], + options={ + 'verbose_name': 'Record relation', + 'verbose_name_plural': 'Record relations', + 'permissions': [('view_recordrelation', 'Can view all Context record 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_context_records.RelationType', verbose_name='Inverse relation')), + ], + options={ + 'verbose_name': 'Relation type', + 'verbose_name_plural': 'Relation types', + 'ordering': ('order', 'label'), + }, + bases=(ishtar_common.models.Cached, models.Model), + ), + migrations.CreateModel( + name='Unit', + 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')), + ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='archaeological_context_records.Unit', verbose_name='Parent context record type')), + ], + options={ + 'verbose_name': 'Context record Type', + 'verbose_name_plural': 'Context record Types', + 'ordering': ('order', 'label'), + }, + 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_context_records.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_context_records.ContextRecord'), + ), + ] diff --git a/archaeological_context_records/migrations/0102_link_apps.py b/archaeological_context_records/migrations/0102_link_apps.py new file mode 100644 index 000000000..cf95824de --- /dev/null +++ b/archaeological_context_records/migrations/0102_link_apps.py @@ -0,0 +1,195 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.27 on 2020-01-23 18:21 +from __future__ import unicode_literals + +from django.conf import settings +import django.contrib.postgres.indexes +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_operations', '0101_squashed'), + ('ishtar_common', '0201_squashed'), + ('archaeological_context_records', '0101_squashed'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.AddField( + model_name='historicalcontextrecord', + name='archaeological_site', + field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='archaeological_operations.ArchaeologicalSite'), + ), + migrations.AddField( + model_name='historicalcontextrecord', + name='excavation_technic', + field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='archaeological_context_records.ExcavationTechnicType'), + ), + migrations.AddField( + model_name='historicalcontextrecord', + name='history_creator', + field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='historicalcontextrecord', + name='history_modifier', + field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='historicalcontextrecord', + name='history_user', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='historicalcontextrecord', + name='identification', + field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='archaeological_context_records.IdentificationType'), + ), + migrations.AddField( + model_name='historicalcontextrecord', + name='lock_user', + field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='historicalcontextrecord', + name='main_image', + field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='ishtar_common.Document'), + ), + migrations.AddField( + model_name='historicalcontextrecord', + 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='historicalcontextrecord', + name='parcel', + field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='archaeological_operations.Parcel'), + ), + migrations.AddField( + model_name='historicalcontextrecord', + 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='historicalcontextrecord', + name='town', + field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='ishtar_common.Town'), + ), + migrations.AddField( + model_name='historicalcontextrecord', + name='unit', + field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='archaeological_context_records.Unit'), + ), + migrations.AddField( + model_name='dating', + name='dating_type', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='archaeological_context_records.DatingType', verbose_name='Dating type'), + ), + migrations.AddField( + model_name='dating', + name='period', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='archaeological_operations.Period', verbose_name='Period'), + ), + migrations.AddField( + model_name='dating', + name='quality', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='archaeological_context_records.DatingQuality', verbose_name='Quality'), + ), + migrations.AddField( + model_name='contextrecord', + name='activity', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='archaeological_context_records.ActivityType', verbose_name='Activity'), + ), + migrations.AddField( + model_name='contextrecord', + name='archaeological_site', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='context_records', to='archaeological_operations.ArchaeologicalSite', verbose_name='Archaeological site'), + ), + migrations.AddField( + model_name='contextrecord', + name='datings', + field=models.ManyToManyField(related_name='context_records', to='archaeological_context_records.Dating'), + ), + migrations.AddField( + model_name='contextrecord', + name='documentations', + field=models.ManyToManyField(blank=True, to='archaeological_context_records.DocumentationType'), + ), + migrations.AddField( + model_name='contextrecord', + name='documents', + field=models.ManyToManyField(blank=True, related_name='context_records', to='ishtar_common.Document', verbose_name='Documents'), + ), + migrations.AddField( + model_name='contextrecord', + name='excavation_technic', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='archaeological_context_records.ExcavationTechnicType', verbose_name='Excavation technique'), + ), + migrations.AddField( + model_name='contextrecord', + 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='contextrecord', + 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='contextrecord', + name='identification', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='archaeological_context_records.IdentificationType', verbose_name='Identification'), + ), + migrations.AddField( + model_name='contextrecord', + name='imports', + field=models.ManyToManyField(blank=True, related_name='imported_archaeological_context_records_contextrecord', to='ishtar_common.Import'), + ), + migrations.AddField( + model_name='contextrecord', + 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='contextrecord', + name='main_image', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='main_image_context_records', to='ishtar_common.Document', verbose_name='Main image'), + ), + migrations.AddField( + model_name='contextrecord', + name='operation', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='context_record', to='archaeological_operations.Operation', verbose_name='Operation'), + ), + migrations.AddField( + model_name='contextrecord', + name='parcel', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='context_record', to='archaeological_operations.Parcel', verbose_name='Parcel'), + ), + migrations.AddField( + model_name='contextrecord', + name='related_context_records', + field=models.ManyToManyField(blank=True, through='archaeological_context_records.RecordRelations', to='archaeological_context_records.ContextRecord'), + ), + migrations.AddField( + model_name='contextrecord', + 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='contextrecord', + name='town', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='context_record', to='ishtar_common.Town', verbose_name='Town'), + ), + migrations.AddField( + model_name='contextrecord', + name='unit', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='archaeological_context_records.Unit', verbose_name='Context record type'), + ), + migrations.AddIndex( + model_name='contextrecord', + index=django.contrib.postgres.indexes.GinIndex(fields=['data'], name='archaeologi_data_1c3119_gin'), + ), + ] |