1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
|
# -*- coding: utf-8 -*-
# Generated by Django 1.11.27 on 2020-01-23 18:21
import archaeological_context_records.models
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 ishtar_common.models_common
import re
import uuid
class Migration(migrations.Migration):
dependencies = [
]
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_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.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_common.FixAssociated, 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'),
),
migrations.RunSQL(
archaeological_context_records.models.RecordRelationView.DELETE_SQL),
migrations.RunSQL(
archaeological_context_records.models.RecordRelationView.CREATE_SQL),
]
|