diff --git a/InvenTree/report/migrations/0001_initial.py b/InvenTree/report/migrations/0001_initial.py index 5d50070c64..8b5c2af09f 100644 --- a/InvenTree/report/migrations/0001_initial.py +++ b/InvenTree/report/migrations/0001_initial.py @@ -1,5 +1,6 @@ -# Generated by Django 3.0.5 on 2020-05-21 03:43 +# Generated by Django 3.0.5 on 2020-05-22 11:00 +import django.core.validators from django.db import migrations, models import report.models @@ -12,12 +13,37 @@ class Migration(migrations.Migration): ] operations = [ + migrations.CreateModel( + name='ReportAsset', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('asset', models.FileField(help_text='Report asset file', upload_to=report.models.rename_asset)), + ('description', models.CharField(help_text='Asset file description', max_length=250)), + ], + ), migrations.CreateModel( name='ReportTemplate', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('template', models.FileField(help_text='Report template file', upload_to=report.models.rename_template)), + ('name', models.CharField(help_text='Template name', max_length=100, unique=True)), + ('template', models.FileField(help_text='Report template file', upload_to=report.models.rename_template, validators=[django.core.validators.FileExtensionValidator(allowed_extensions=['html', 'htm', 'tex'])])), ('description', models.CharField(help_text='Report template description', max_length=250)), ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='TestReport', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(help_text='Template name', max_length=100, unique=True)), + ('template', models.FileField(help_text='Report template file', upload_to=report.models.rename_template, validators=[django.core.validators.FileExtensionValidator(allowed_extensions=['html', 'htm', 'tex'])])), + ('description', models.CharField(help_text='Report template description', max_length=250)), + ('part_filters', models.CharField(blank=True, help_text='Part query filters (comma-separated list of key=value pairs)', max_length=250, validators=[report.models.validateFilterString])), + ], + options={ + 'abstract': False, + }, ), ] diff --git a/InvenTree/report/migrations/0002_auto_20200521_0350.py b/InvenTree/report/migrations/0002_auto_20200521_0350.py deleted file mode 100644 index 6a88531438..0000000000 --- a/InvenTree/report/migrations/0002_auto_20200521_0350.py +++ /dev/null @@ -1,20 +0,0 @@ -# Generated by Django 3.0.5 on 2020-05-21 03:50 - -import django.core.validators -from django.db import migrations, models -import report.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('report', '0001_initial'), - ] - - operations = [ - migrations.AlterField( - model_name='reporttemplate', - name='template', - field=models.FileField(help_text='Report template file', upload_to=report.models.rename_template, validators=[django.core.validators.FileExtensionValidator(allowed_extensions=['html', 'tex'])]), - ), - ] diff --git a/InvenTree/report/migrations/0003_reportasset.py b/InvenTree/report/migrations/0003_reportasset.py deleted file mode 100644 index 6f9c8efd03..0000000000 --- a/InvenTree/report/migrations/0003_reportasset.py +++ /dev/null @@ -1,22 +0,0 @@ -# Generated by Django 3.0.5 on 2020-05-21 04:04 - -from django.db import migrations, models -import report.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('report', '0002_auto_20200521_0350'), - ] - - operations = [ - migrations.CreateModel( - name='ReportAsset', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('asset', models.FileField(help_text='Report asset file', upload_to=report.models.rename_asset)), - ('description', models.CharField(help_text='Asset file description', max_length=250)), - ], - ), - ] diff --git a/InvenTree/report/migrations/0004_auto_20200521_1217.py b/InvenTree/report/migrations/0004_auto_20200521_1217.py deleted file mode 100644 index c4342ada3d..0000000000 --- a/InvenTree/report/migrations/0004_auto_20200521_1217.py +++ /dev/null @@ -1,25 +0,0 @@ -# Generated by Django 3.0.5 on 2020-05-21 12:17 - -from django.db import migrations, models -import report.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('report', '0003_reportasset'), - ] - - operations = [ - migrations.AddField( - model_name='reporttemplate', - name='filters', - field=models.CharField(blank=True, help_text='Query filters (comma-separated list of key=value pairs)', max_length=250, validators=[report.models.validate_filter_string]), - ), - migrations.AddField( - model_name='reporttemplate', - name='name', - field=models.CharField(default='Test', help_text='Template name', max_length=100, unique=True), - preserve_default=False, - ), - ] diff --git a/InvenTree/report/migrations/0005_auto_20200522_0220.py b/InvenTree/report/migrations/0005_auto_20200522_0220.py deleted file mode 100644 index d3c2d52520..0000000000 --- a/InvenTree/report/migrations/0005_auto_20200522_0220.py +++ /dev/null @@ -1,33 +0,0 @@ -# Generated by Django 3.0.5 on 2020-05-22 02:20 - -import django.core.validators -from django.db import migrations, models -import report.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('report', '0004_auto_20200521_1217'), - ] - - operations = [ - migrations.CreateModel( - name='TestReport', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(help_text='Template name', max_length=100, unique=True)), - ('template', models.FileField(help_text='Report template file', upload_to=report.models.rename_template, validators=[django.core.validators.FileExtensionValidator(allowed_extensions=['html', 'htm', 'tex'])])), - ('description', models.CharField(help_text='Report template description', max_length=250)), - ('filters', models.CharField(blank=True, help_text='Query filters (comma-separated list of key=value pairs)', max_length=250, validators=[report.models.validate_filter_string])), - ], - options={ - 'abstract': False, - }, - ), - migrations.AlterField( - model_name='reporttemplate', - name='template', - field=models.FileField(help_text='Report template file', upload_to=report.models.rename_template, validators=[django.core.validators.FileExtensionValidator(allowed_extensions=['html', 'htm', 'tex'])]), - ), - ]