diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-08-03 17:53:55 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-08-03 18:00:22 +0200 |
commit | c328845dacc9f66fea624b26e06db20d764529be (patch) | |
tree | ff68e86facf98e4e278162d81af44189a715584a /archaeological_files/migrations | |
parent | b02f7994119b99a6a20cb2810f65f4e63b56082c (diff) | |
download | Ishtar-c328845dacc9f66fea624b26e06db20d764529be.tar.bz2 Ishtar-c328845dacc9f66fea624b26e06db20d764529be.zip |
Preventive file: add fields - remove dynamic add (too buggy for now)
Diffstat (limited to 'archaeological_files/migrations')
-rw-r--r-- | archaeological_files/migrations/0106_auto_20210803_1730.py (renamed from archaeological_files/migrations/0106_auto_20210730_1749.py) | 57 |
1 files changed, 56 insertions, 1 deletions
diff --git a/archaeological_files/migrations/0106_auto_20210730_1749.py b/archaeological_files/migrations/0106_auto_20210803_1730.py index 8af41ba91..7f78e72fe 100644 --- a/archaeological_files/migrations/0106_auto_20210730_1749.py +++ b/archaeological_files/migrations/0106_auto_20210803_1730.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Generated by Django 1.11.28 on 2021-07-30 17:49 +# Generated by Django 1.11.28 on 2021-08-03 17:30 from __future__ import unicode_literals import django.core.validators @@ -17,6 +17,22 @@ class Migration(migrations.Migration): operations = [ migrations.CreateModel( + name='AgreementType', + 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': 'Agreement type - France', + 'verbose_name_plural': 'Agreement types - France', + 'ordering': ('label',), + }, + bases=(ishtar_common.models_common.Cached, models.Model), + ), + migrations.CreateModel( name='EquipmentServiceCost', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), @@ -94,6 +110,25 @@ class Migration(migrations.Migration): bases=(ishtar_common.models_common.Cached, models.Model), ), migrations.CreateModel( + name='OperationTypeForRoyalties', + 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')), + ('increase_coefficient', models.FloatField(default=1, verbose_name='Increase coefficient')), + ('increased_final_value', models.FloatField(default=1, verbose_name='Increased final value')), + ('category', models.PositiveSmallIntegerField(default=1, validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(5)], verbose_name='Category')), + ], + options={ + 'verbose_name': 'Operation type for royalties - France', + 'verbose_name_plural': 'Operation types for royalties - France', + 'ordering': ('id',), + }, + bases=(ishtar_common.models_common.Cached, models.Model), + ), + migrations.CreateModel( name='PreventiveFileEquipmentServiceCost', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), @@ -243,4 +278,24 @@ class Migration(migrations.Migration): 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='file', + name='operation_type_for_royalties', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='archaeological_files.OperationTypeForRoyalties', verbose_name='Operation type for royalties'), + ), + migrations.AddField( + model_name='file', + name='type_of_agreement', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='archaeological_files.AgreementType', verbose_name='Type of agreement'), + ), + migrations.AddField( + model_name='historicalfile', + name='operation_type_for_royalties', + field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='archaeological_files.OperationTypeForRoyalties', verbose_name='Operation type for royalties'), + ), + migrations.AddField( + model_name='historicalfile', + name='type_of_agreement', + field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='archaeological_files.AgreementType', verbose_name='Type of agreement'), + ), ] |