From 256a974c4cd4b761a8e6875de773f2bcdd46b95f Mon Sep 17 00:00:00 2001 From: Maxime Bombar Date: Thu, 28 Jun 2018 20:35:34 +0200 Subject: [PATCH] printer/migrations --- printer/migrations/0001_initial.py | 26 ++++++++++ printer/migrations/0002_auto_20180628_2032.py | 48 +++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 printer/migrations/0001_initial.py create mode 100644 printer/migrations/0002_auto_20180628_2032.py diff --git a/printer/migrations/0001_initial.py b/printer/migrations/0001_initial.py new file mode 100644 index 00000000..55f63a7f --- /dev/null +++ b/printer/migrations/0001_initial.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.7 on 2018-06-28 18:30 +from __future__ import unicode_literals + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='Dummy', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)), + ], + ), + ] diff --git a/printer/migrations/0002_auto_20180628_2032.py b/printer/migrations/0002_auto_20180628_2032.py new file mode 100644 index 00000000..a9439262 --- /dev/null +++ b/printer/migrations/0002_auto_20180628_2032.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.7 on 2018-06-28 18:32 +from __future__ import unicode_literals + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion +import printer.models +import printer.validators +import re2o.mixins + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('printer', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='JobWithOptions', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('file', models.FileField(upload_to=printer.models.user_printing_path, validators=[printer.validators.FileValidator(allowed_types=['application/pdf'], max_size=10485760)])), + ('starttime', models.DateTimeField(auto_now_add=True)), + ('endtime', models.DateTimeField(null=True)), + ('status', models.CharField(choices=[('Printable', 'Printable'), ('Running', 'Running'), ('Cancelled', 'Cancelled'), ('Finished', 'Finished')], max_length=255)), + ('price', models.IntegerField(default=0)), + ('format', models.CharField(choices=[('A4', 'A4'), ('A3', 'A4')], default='A4', max_length=255)), + ('color', models.CharField(choices=[('Greyscale', 'Greyscale'), ('Color', 'Color')], default='Greyscale', max_length=255)), + ('disposition', models.CharField(choices=[('TwoSided', 'Two sided'), ('OneSided', 'One sided'), ('Booklet', 'Booklet')], default='TwoSided', max_length=255)), + ('count', models.PositiveIntegerField(default=1)), + ('stapling', models.CharField(choices=[('None', 'None'), ('TopLeft', 'One top left'), ('TopRight', 'One top right'), ('LeftSided', 'Two left sided'), ('RightSided', 'Two right sided')], default='None', max_length=255)), + ('perforation', models.CharField(choices=[('None', 'None'), ('TwoLeftSidedHoles', 'Two left sided holes'), ('TwoRightSidedHoles', 'Two right sided holes'), ('TwoTopHoles', 'Two top holes'), ('TwoBottomHoles', 'Two bottom holes'), ('FourLeftSidedHoles', 'Four left sided holes'), ('FourRightSidedHoles', 'Four right sided holes')], default='None', max_length=255)), + ('printAs', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, related_name='print_as_user', to=settings.AUTH_USER_MODEL)), + ('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)), + ], + bases=(re2o.mixins.RevMixin, models.Model), + ), + migrations.RemoveField( + model_name='dummy', + name='user', + ), + migrations.DeleteModel( + name='Dummy', + ), + ]