diff options
Diffstat (limited to 'archaeological_files/migrations')
-rw-r--r-- | archaeological_files/migrations/0106_auto_20210720_1203.py (renamed from archaeological_files/migrations/0106_auto_20210708_1044.py) | 121 |
1 files changed, 33 insertions, 88 deletions
diff --git a/archaeological_files/migrations/0106_auto_20210708_1044.py b/archaeological_files/migrations/0106_auto_20210720_1203.py index c09f9338f..86ff78ec6 100644 --- a/archaeological_files/migrations/0106_auto_20210708_1044.py +++ b/archaeological_files/migrations/0106_auto_20210720_1203.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Generated by Django 1.11.28 on 2021-07-08 10:44 +# Generated by Django 1.11.27 on 2021-07-20 12:03 from __future__ import unicode_literals import django.core.validators @@ -17,53 +17,54 @@ class Migration(migrations.Migration): operations = [ migrations.CreateModel( - name='EquipmentCost', + name='EquipmentServiceCost', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('service_provider', models.CharField(default='-', max_length=200, verbose_name='Service provider')), + ('service_provider', models.CharField(blank=True, default='', max_length=200, verbose_name='Service provider')), ('flat_rate', models.BooleanField(default=False, verbose_name='Flat rate')), - ('daily_cost', models.FloatField(blank=True, null=True, verbose_name='Daily cost')), - ('monday', models.BooleanField(default=True, verbose_name='Monday')), - ('tuesday', models.BooleanField(default=True, verbose_name='Tuesday')), - ('wednesday', models.BooleanField(default=True, verbose_name='Wednesday')), - ('thursday', models.BooleanField(default=True, verbose_name='Thursday')), - ('friday', models.BooleanField(default=True, verbose_name='Friday')), + ('unitary_cost', models.FloatField(blank=True, null=True, verbose_name='Unitary cost')), + ('unit', models.CharField(blank=True, choices=[('D', 'days'), ('W', 'weeks'), ('M', 'months'), ('L', 'linear meter')], max_length=1, null=True, verbose_name='Unit')), + ('specificity', models.CharField(blank=True, default='', max_length=200, verbose_name='Specificity')), ('order', models.IntegerField(default=10, verbose_name='Order')), + ('available', models.BooleanField(default=True, verbose_name='Available')), ], options={ - 'verbose_name': 'Equipment cost', - 'verbose_name_plural': 'Equipment costs', + 'verbose_name': 'Equipment/service cost', + 'verbose_name_plural': 'Equipment/service costs', + 'ordering': ('order', 'equipment_service_type__label'), }, ), migrations.CreateModel( - name='EquipmentType', + name='EquipmentServiceType', 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, default='', verbose_name='Comment')), ('available', models.BooleanField(default=True, verbose_name='Available')), + ('order', models.IntegerField(default=10, verbose_name='Order')), ], options={ - 'verbose_name': 'Equipment type', - 'verbose_name_plural': 'Equipment types', - 'ordering': ('label',), + 'verbose_name': 'Equipment/service type', + 'verbose_name_plural': 'Equipment/service types', + 'ordering': ('order', 'label'), }, bases=(ishtar_common.models_common.Cached, models.Model), ), migrations.CreateModel( - name='GenericEquipmentType', + name='GenericEquipmentServiceType', 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, default='', verbose_name='Comment')), ('available', models.BooleanField(default=True, verbose_name='Available')), + ('order', models.IntegerField(default=10, verbose_name='Order')), ], options={ 'verbose_name': 'Generic equipment type', 'verbose_name_plural': 'Generic equipment types', - 'ordering': ('label',), + 'ordering': ('order', 'label'), }, bases=(ishtar_common.models_common.Cached, models.Model), ), @@ -86,22 +87,22 @@ class Migration(migrations.Migration): options={ 'verbose_name': 'Job', 'verbose_name_plural': 'Jobs', - 'ordering': ('label',), + 'ordering': ('order', 'label'), }, bases=(ishtar_common.models_common.Cached, models.Model), ), migrations.CreateModel( - name='PreventiveFileEquipmentCost', + name='PreventiveFileEquipmentServiceCost', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('quantity_by_day_planned', models.FloatField(blank=True, null=True, verbose_name='Quantity by day - planned')), ('days_planned', models.FloatField(blank=True, null=True, verbose_name='Days - planned')), ('quantity_by_day_worked', models.FloatField(blank=True, null=True, verbose_name='Quantity by day - worked')), ('days_worked', models.FloatField(blank=True, null=True, verbose_name='Days - worked')), - ('equipment_cost', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='archaeological_files.EquipmentCost')), + ('equipment_service_cost', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='archaeological_files.EquipmentServiceCost')), ], options={ - 'abstract': False, + 'ordering': ('equipment_service_cost',), }, ), migrations.CreateModel( @@ -114,7 +115,7 @@ class Migration(migrations.Migration): ('days_worked', models.FloatField(blank=True, null=True, verbose_name='Days - worked')), ], options={ - 'abstract': False, + 'ordering': ('job',), }, ), migrations.CreateModel( @@ -127,53 +128,7 @@ class Migration(migrations.Migration): ('days_worked', models.FloatField(blank=True, null=True, verbose_name='Days - worked')), ], options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='PreventiveFileTechnicalServiceCost', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('quantity_by_day_planned', models.FloatField(blank=True, null=True, verbose_name='Quantity by day - planned')), - ('days_planned', models.FloatField(blank=True, null=True, verbose_name='Days - planned')), - ('quantity_by_day_worked', models.FloatField(blank=True, null=True, verbose_name='Quantity by day - worked')), - ('days_worked', models.FloatField(blank=True, null=True, verbose_name='Days - worked')), - ], - options={ - 'abstract': False, - }, - ), - migrations.CreateModel( - name='TechnicalService', - 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, default='', verbose_name='Comment')), - ('available', models.BooleanField(default=True, verbose_name='Available')), - ], - options={ - 'verbose_name': 'Technical service', - 'verbose_name_plural': 'Technical services', - 'ordering': ('label',), - }, - bases=(ishtar_common.models_common.Cached, models.Model), - ), - migrations.CreateModel( - name='TechnicalServiceCost', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('service_provider', models.CharField(default='-', max_length=200, verbose_name='Service provider')), - ('flat_rate', models.BooleanField(default=False, verbose_name='Flat rate')), - ('unitary_cost', models.FloatField(blank=True, null=True, verbose_name='Unitary cost')), - ('unit', models.CharField(blank=True, choices=[('D', 'Days'), ('M', 'Linear meter')], max_length=1, null=True, verbose_name='Unit')), - ('order', models.IntegerField(default=10, verbose_name='Order')), - ('parents', models.ManyToManyField(blank=True, help_text='Auto-add this cost when a parent is added', related_name='_technicalservicecost_parents_+', to='archaeological_files.TechnicalServiceCost', verbose_name='Parents')), - ('technical_service', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='archaeological_files.TechnicalService', verbose_name='Technical service')), - ], - options={ - 'verbose_name': 'Technical service cost', - 'verbose_name_plural': 'Technical service costs', + 'ordering': ('job',), }, ), migrations.AddField( @@ -247,16 +202,6 @@ class Migration(migrations.Migration): field=models.DateField(blank=True, null=True, verbose_name='End date'), ), migrations.AddField( - model_name='preventivefiletechnicalservicecost', - name='file', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='technical_service_costs', to='archaeological_files.File'), - ), - migrations.AddField( - model_name='preventivefiletechnicalservicecost', - name='technical_service_cost', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='archaeological_files.TechnicalServiceCost'), - ), - migrations.AddField( model_name='preventivefilejob', name='file', field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='jobs', to='archaeological_files.File'), @@ -277,23 +222,23 @@ class Migration(migrations.Migration): field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='archaeological_files.Job'), ), migrations.AddField( - model_name='preventivefileequipmentcost', + model_name='preventivefileequipmentservicecost', name='file', field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='equipment_costs', to='archaeological_files.File'), ), migrations.AddField( - model_name='equipmenttype', + model_name='equipmentservicetype', name='generic_equipment_type', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='archaeological_files.GenericEquipmentType', verbose_name='Generic type'), + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='archaeological_files.GenericEquipmentServiceType', verbose_name='Generic type'), ), migrations.AddField( - model_name='equipmentcost', - name='equipment_type', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='archaeological_files.EquipmentType', verbose_name='Equipment'), + model_name='equipmentservicetype', + name='parent', + field=models.ForeignKey(blank=True, help_text='Auto-add this cost when a parent is added', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='archaeological_files.EquipmentServiceType', verbose_name='Parent'), ), migrations.AddField( - model_name='equipmentcost', - name='parents', - field=models.ManyToManyField(blank=True, help_text='Auto-add this cost when a parent is added', related_name='_equipmentcost_parents_+', to='archaeological_files.EquipmentCost', verbose_name='Parents'), + model_name='equipmentservicecost', + name='equipment_service_type', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='archaeological_files.EquipmentServiceType', verbose_name='Equipment/Service'), ), ] |