Exemplo n.º 1
0
class Migration(migrations.Migration):

    dependencies = [
        ('data', '0002_migration_index'),
    ]

    operations = [
        migrations.AddField(
            model_name='apifetch',
            name='apiKey',
            field=django.contrib.postgres.fields.ArrayField(
                base_field=models.CharField(default='', max_length=100),
                default=data.models.APIFetch.getDefaultAPIKeys,
                size=None),
        ),
        migrations.AddField(
            model_name='apifetch',
            name='fetchInterval',
            field=models.IntegerField(default=60),
        ),
        migrations.AddField(
            model_name='apifetch',
            name='searchQuery',
            field=models.CharField(default='', max_length=50),
        ),
    ]
Exemplo n.º 2
0
class Migration(migrations.Migration):

    dependencies = [
        ('data', '0009_auto_20180623_1217'),
    ]

    operations = [
        migrations.AddField(
            model_name='event',
            name='event_logo',
            field=models.ImageField(
                blank=True,
                help_text='Please Upload A Logo For This Event',
                upload_to=data.models.get_event_logo_upload_url,
                verbose_name='Event Logo'),
        ),
        migrations.AlterField(
            model_name='event',
            name='priority',
            field=models.IntegerField(
                default=0,
                help_text=
                'Events will be ordered Based on priority. Higher Priority events appear first in list',
                verbose_name='Priority'),
        ),
    ]
Exemplo n.º 3
0
class Migration(migrations.Migration):

    dependencies = [
        ("data", "0004_auto_20200501_1416"),
    ]

    operations = [
        migrations.AlterField(
            model_name="paper",
            name="year",
            field=models.IntegerField(
                validators=[
                    django.core.validators.MinValueValidator(1951),
                    data.models.max_value_current_year,
                ]
            ),
        ),
    ]
Exemplo n.º 4
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0007_alter_validators_add_error_messages'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='EventLog',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=256)),
                ('description', models.CharField(blank=True, max_length=512)),
                ('timestamp',
                 models.DateTimeField(default=data.models.get_now)),
            ],
        ),
        migrations.CreateModel(
            name='Image',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('filename',
                 models.CharField(max_length=512, verbose_name=b'Filename')),
            ],
        ),
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('finished',
                 models.IntegerField(choices=[(0, b'No'), (1, b'Yes'),
                                              (2, b'N/A')],
                                     default=0)),
                ('street_num',
                 models.CharField(max_length=64,
                                  null=True,
                                  verbose_name=b'Street #')),
                ('street_nam',
                 models.CharField(max_length=512,
                                  null=True,
                                  verbose_name=b'Street name')),
                ('city',
                 models.CharField(max_length=512,
                                  null=True,
                                  verbose_name=b'City')),
                ('state',
                 models.CharField(choices=[(b'AL', b'AL'), (b'AK', b'AK'),
                                           (b'AZ', b'AZ'), (b'AR', b'AR'),
                                           (b'CA', b'CA'), (b'CO', b'CO'),
                                           (b'CT', b'CT'), (b'DC', b'DC'),
                                           (b'DE', b'DE'), (b'FL', b'FL'),
                                           (b'GA', b'GA'), (b'HI', b'HI'),
                                           (b'ID', b'ID'), (b'IL', b'IL'),
                                           (b'IN', b'IN'), (b'IA', b'IA'),
                                           (b'KS', b'KS'), (b'KY', b'KY'),
                                           (b'LA', b'LA'), (b'ME', b'ME'),
                                           (b'MD', b'MD'), (b'MA', b'MA'),
                                           (b'MI', b'MI'), (b'MN', b'MN'),
                                           (b'MS', b'MS'), (b'MO', b'MO'),
                                           (b'MT', b'MT'), (b'NE', b'NE'),
                                           (b'NV', b'NV'), (b'NH', b'NH'),
                                           (b'NJ', b'NJ'), (b'NM', b'NM'),
                                           (b'NY', b'NY'), (b'NC', b'NC'),
                                           (b'ND', b'ND'), (b'OH', b'OH'),
                                           (b'OK', b'OK'), (b'OR', b'OR'),
                                           (b'PA', b'PA'), (b'RI', b'RI'),
                                           (b'SC', b'SC'), (b'SD', b'SD'),
                                           (b'TN', b'TN'), (b'TX', b'TX'),
                                           (b'UT', b'UT'), (b'VT', b'VT'),
                                           (b'VA', b'VA'), (b'WA', b'WA'),
                                           (b'WV', b'WV'), (b'WI', b'WI'),
                                           (b'WY', b'WY')],
                                  max_length=4,
                                  null=True,
                                  verbose_name=b'State')),
                ('month',
                 models.IntegerField(choices=[(1, b'Jan'), (2, b'Feb'),
                                              (3, b'Mar'), (4, b'Apr'),
                                              (5, b'May'), (6, b'Jun'),
                                              (7, b'Jul'), (8, b'Aug'),
                                              (9, b'Sep'), (10, b'Oct'),
                                              (11, b'Nov'), (12, b'Dec')],
                                     null=True)),
                ('year',
                 models.IntegerField(choices=[(2000, 2000), (2001, 2001),
                                              (2002, 2002), (2003, 2003),
                                              (2004, 2004), (2005, 2005),
                                              (2006, 2006), (2007, 2007),
                                              (2008, 2008), (2009, 2009),
                                              (2010, 2010), (2011, 2011),
                                              (2012, 2012), (2013, 2013),
                                              (2014, 2014), (2015, 2015),
                                              (2016, 2016)],
                                     null=True)),
                ('pic_quality',
                 models.IntegerField(
                     choices=[(1, b'Strongly Disagree'), (2, b'Disagree'),
                              (3, b'Neither Agree or Disagree'), (4, b'Agree'),
                              (5, b'Strongly Agree'), (6, b'N/A')],
                     null=True,
                     verbose_name=b'The quality of the actual picture is high')
                 ),
                ('str_quality',
                 models.IntegerField(
                     choices=[(1, b'Strongly Disagree'), (2, b'Disagree'),
                              (3, b'Neither Agree or Disagree'), (4, b'Agree'),
                              (5, b'Strongly Agree'), (6, b'N/A')],
                     null=True,
                     verbose_name=
                     b'The quality of the streets visible in the picture is high'
                 )),
                ('pot_holes',
                 models.IntegerField(
                     choices=[(0, b'0'), (1, b'1'), (2, b'2'), (3, b'3'),
                              (4, b'4'), (5, b'5'), (6, b'5+'), (7, b'N/A')],
                     null=True,
                     verbose_name=
                     b'How many potholes are visible in the picture')),
                ('bui_quality',
                 models.IntegerField(
                     choices=[(1, b'Strongly Disagree'), (2, b'Disagree'),
                              (3, b'Neither Agree or Disagree'), (4, b'Agree'),
                              (5, b'Strongly Agree'), (6, b'N/A')],
                     null=True,
                     verbose_name=
                     b'The quality of buildings visible in the picture is high'
                 )),
                ('car_quality',
                 models.IntegerField(
                     choices=[(1, b'Strongly Disagree'), (2, b'Disagree'),
                              (3, b'Neither Agree or Disagree'), (4, b'Agree'),
                              (5, b'Strongly Agree'), (6, b'N/A')],
                     null=True,
                     verbose_name=
                     b'The quality of the vehicles visible in the picture is high'
                 )),
                ('litter',
                 models.IntegerField(
                     choices=[(1, b'Strongly Disagree'), (2, b'Disagree'),
                              (3, b'Neither Agree or Disagree'), (4, b'Agree'),
                              (5, b'Strongly Agree'), (6, b'N/A')],
                     null=True,
                     verbose_name=
                     b'The amount of litter visible in the picture is high')),
                ('road_work',
                 models.IntegerField(
                     choices=[(0, b'No'), (1, b'Yes'), (2, b'N/A')],
                     null=True,
                     verbose_name=
                     b'Are there signs of road work visible in the picture')),
                ('graffiti',
                 models.IntegerField(
                     choices=[(0, b'No'), (1, b'Yes'), (2, b'N/A')],
                     null=True,
                     verbose_name=b'Is there graffiti visible in the picture')
                 ),
                ('for_sale',
                 models.IntegerField(
                     choices=[(0, b'No'), (1, b'Yes'), (2, b'N/A')],
                     null=True,
                     verbose_name=
                     b'There are one or more house for sale signs visible in the picture'
                 )),
                ('shoes',
                 models.IntegerField(
                     choices=[(0, b'No'), (1, b'Yes'), (2, b'N/A')],
                     null=True,
                     verbose_name=
                     b'Are there shoes on a wire visible in the picture')),
                ('trees',
                 models.IntegerField(
                     choices=[(0, b'No'), (1, b'Yes'), (2, b'N/A')],
                     null=True,
                     verbose_name=
                     b'Are there trees and/or large bushes visible in the picture'
                 )),
                ('broken_signs',
                 models.IntegerField(
                     choices=[(0, b'No'), (1, b'Yes'), (2, b'N/A')],
                     null=True,
                     verbose_name=
                     b'Are there any broken street signs visible in the picture'
                 )),
                ('people',
                 models.IntegerField(
                     choices=[(0, b'No'), (1, b'Yes'), (2, b'N/A')],
                     null=True,
                     verbose_name=
                     b'Are there people actively covering their faces visible in the picture'
                 )),
                ('timestarted',
                 models.DateTimeField(default=data.models.get_now)),
                ('timefinished', models.DateTimeField(blank=True, null=True)),
                ('image',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='data.Image')),
            ],
        ),
        migrations.CreateModel(
            name='Treatment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('wage',
                 models.CharField(max_length=128, verbose_name=b'Wage Rate')),
                ('tutorial', models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='WorkTimer',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('page', models.CharField(max_length=28, null=True)),
                ('value', models.IntegerField()),
                ('token', models.CharField(max_length=256)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('task',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='data.Task')),
            ],
        ),
        migrations.CreateModel(
            name='TimeSheet',
            fields=[],
            options={
                'proxy': True,
            },
            bases=('auth.user', ),
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.AddField(
            model_name='worktimer',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='treatment',
            name='user',
            field=models.OneToOneField(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='task',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='eventlog',
            name='task',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='data.Task'),
        ),
        migrations.AddField(
            model_name='eventlog',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
    ]
Exemplo n.º 5
0
class Migration(migrations.Migration):

    dependencies = [
        ('data', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Reserve',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='Criado em')),
                ('deleted',
                 models.DateTimeField(blank=True,
                                      editable=False,
                                      null=True,
                                      verbose_name='Deletado em')),
                ('modified',
                 models.DateTimeField(auto_now=True,
                                      verbose_name='Modificado em')),
                ('remedio',
                 models.CharField(max_length=150, verbose_name='Remédio')),
                ('quantity',
                 models.IntegerField(null=True, verbose_name='Quantidade')),
                ('quantity_unit',
                 models.CharField(blank=True,
                                  choices=[('mg', 'mg'), ('g', 'g'),
                                           ('kg', 'kg'), ('ml', 'ml'),
                                           ('l', 'l'), ('cx', 'cx')],
                                  max_length=2,
                                  null=True,
                                  verbose_name='Unidade')),
                ('pills',
                 models.IntegerField(verbose_name='Quantidade (em pílulas)')),
                ('doctor',
                 models.CharField(max_length=150,
                                  verbose_name='Nome do Médico')),
                ('crm',
                 models.CharField(max_length=10,
                                  verbose_name='CRM do Médico')),
                ('prescription',
                 models.FileField(
                     upload_to=data.models.prescription_file_upload,
                     verbose_name='Receita')),
            ],
            options={
                'verbose_name': 'Reserva',
                'verbose_name_plural': 'Reservas',
                'ordering': ['remedio'],
            },
        ),
        migrations.AlterModelOptions(
            name='donation',
            options={
                'ordering': ['remedio'],
                'verbose_name': 'Doação',
                'verbose_name_plural': 'Doações'
            },
        ),
        migrations.AlterField(
            model_name='donation',
            name='quantity_unit',
            field=models.CharField(blank=True,
                                   max_length=2,
                                   null=True,
                                   verbose_name='Unidade'),
        ),
    ]
Exemplo n.º 6
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('users', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Fahrzeug',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('farbe', models.CharField(max_length=8)),
                ('baujahr', models.IntegerField()),
                ('kaufdatum', models.DateField()),
                ('preis', models.IntegerField()),
                ('added_by',
                 models.ForeignKey(
                     default=data.models.get_default_user,
                     on_delete=django.db.models.deletion.SET_DEFAULT,
                     to='users.Profile')),
            ],
        ),
        migrations.CreateModel(
            name='Service',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('was', models.TextField()),
                ('wann', models.DateField()),
                ('prio',
                 models.CharField(choices=[('Reparatur', 'Reparatur'),
                                           ('Service', 'Service'),
                                           ('Pflege', 'Pflege'),
                                           ('Verbesserung', 'Verbesserung')],
                                  max_length=14)),
                ('km', models.IntegerField()),
                ('kostenpunkt', models.IntegerField()),
                ('added_by',
                 models.ForeignKey(
                     default=data.models.get_default_user,
                     on_delete=django.db.models.deletion.SET_DEFAULT,
                     to='users.Profile')),
                ('fahrzeug',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='data.Fahrzeug')),
            ],
        ),
        migrations.CreateModel(
            name='FahrzeugServiceProfil',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('fahrzeug',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='user_mit_service',
                                   to='data.Fahrzeug')),
                ('profile',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='fahrzeug_mit_service',
                                   to='users.Profile')),
                ('service',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='data.Service')),
            ],
        ),
        migrations.AddField(
            model_name='fahrzeug',
            name='owners',
            field=models.ManyToManyField(related_name='fahrzeuge',
                                         through='data.FahrzeugServiceProfil',
                                         to='users.Profile'),
        ),
    ]
Exemplo n.º 7
0
class Migration(migrations.Migration):

    dependencies = [
        ("contenttypes", "0002_remove_content_type_name"),
        ("data", "0011_auto_20201013_1808"),
        ("common", "0009_auto_20201013_1917"),
    ]

    operations = [
        migrations.SeparateDatabaseAndState(
            state_operations=[
                migrations.CreateModel(
                    name="UnitConversion",
                    fields=[
                        (
                            "id",
                            models.AutoField(
                                auto_created=True,
                                primary_key=True,
                                serialize=False,
                                verbose_name="ID",
                            ),
                        ),
                        (
                            "from_unit",
                            models.CharField(
                                choices=[
                                    ("mL", "milliliter"),
                                    ("g", "gram"),
                                    ("pcs", "stuk"),
                                    ("el", "eetlepel"),
                                    ("tl", "theelepel"),
                                ],
                                default="g",
                                max_length=5,
                            ),
                        ),
                        ("scale", models.FloatField()),
                        (
                            "to_unit",
                            models.CharField(
                                choices=[
                                    ("mL", "milliliter"),
                                    ("g", "gram"),
                                    ("pcs", "stuk"),
                                    ("el", "eetlepel"),
                                    ("tl", "theelepel"),
                                ],
                                default="mL",
                                max_length=5,
                            ),
                        ),
                        ("object_id", models.IntegerField()),
                        (
                            "content_type",
                            models.ForeignKey(
                                on_delete=django.db.models.deletion.CASCADE,
                                to="contenttypes.contenttype",
                            ),
                        ),
                    ],
                ),
                migrations.CreateModel(
                    name="ImageTag",
                    fields=[
                        (
                            "id",
                            models.AutoField(
                                auto_created=True,
                                primary_key=True,
                                serialize=False,
                                verbose_name="ID",
                            ),
                        ),
                        (
                            "image",
                            models.ImageField(
                                height_field="height",
                                upload_to=data.models.model_directory_path,
                                width_field="width",
                            ),
                        ),
                        (
                            "width",
                            models.IntegerField(blank=True,
                                                editable=False,
                                                null=True),
                        ),
                        (
                            "height",
                            models.IntegerField(blank=True,
                                                editable=False,
                                                null=True),
                        ),
                        ("name", models.CharField(blank=True, max_length=150)),
                        ("caption", models.TextField(blank=True)),
                        ("created_at",
                         models.DateTimeField(auto_now_add=True)),
                        ("updated_at", models.DateTimeField(auto_now=True)),
                        ("object_id", models.IntegerField(editable=False)),
                        (
                            "content_type",
                            models.ForeignKey(
                                editable=False,
                                on_delete=django.db.models.deletion.CASCADE,
                                to="contenttypes.contenttype",
                            ),
                        ),
                    ],
                ),
                migrations.CreateModel(
                    name="AlternateImageTag",
                    fields=[
                        (
                            "id",
                            models.AutoField(
                                auto_created=True,
                                primary_key=True,
                                serialize=False,
                                verbose_name="ID",
                            ),
                        ),
                        (
                            "image",
                            models.ImageField(
                                height_field="height",
                                upload_to="imagetags/alternates",
                                width_field="width",
                            ),
                        ),
                        (
                            "width",
                            models.IntegerField(blank=True,
                                                editable=False,
                                                null=True),
                        ),
                        (
                            "height",
                            models.IntegerField(blank=True,
                                                editable=False,
                                                null=True),
                        ),
                        (
                            "original",
                            models.ForeignKey(
                                editable=False,
                                on_delete=django.db.models.deletion.CASCADE,
                                related_name="alternates",
                                to="data.imagetag",
                            ),
                        ),
                    ],
                ),
                migrations.AddConstraint(
                    model_name="unitconversion",
                    constraint=models.UniqueConstraint(
                        fields=("object_id", "content_type", "from_unit",
                                "to_unit"),
                        name="unique_conversions",
                    ),
                ),
            ],
            database_operations=[
                migrations.RunPython(update_common_contentypes,
                                     update_common_contentypes_reverse)
            ],
        ),
    ]
Exemplo n.º 8
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('data', '0005_auto_20181205_0923'),
    ]

    operations = [
        migrations.CreateModel(
            name='Artist',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('mbid', models.UUIDField(blank=True, null=True)),
                ('gender',
                 models.CharField(blank=True,
                                  choices=[('M', 'Male'), ('F', 'Female')],
                                  max_length=1,
                                  null=True)),
                ('begin', models.CharField(blank=True,
                                           max_length=10,
                                           null=True)),
                ('end', models.CharField(blank=True, max_length=10,
                                         null=True)),
                ('artist_type',
                 models.CharField(choices=[('P', 'Person'), ('G', 'Group')],
                                  default='P',
                                  max_length=1)),
                ('dummy', models.BooleanField(db_index=True, default=False)),
                ('description_edited', models.BooleanField(default=False)),
                ('romanisation',
                 models.CharField(blank=True, max_length=200, null=True)),
                ('description',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='+',
                                   to='data.Description')),
                ('group_members',
                 models.ManyToManyField(blank=True,
                                        related_name='groups',
                                        to='jingju.Artist')),
                ('image',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='jingju_artist_image',
                                   to='data.Image')),
            ],
            options={
                'ordering': ['id'],
            },
            bases=(models.Model, data.models.ImageMixin),
        ),
        migrations.CreateModel(
            name='Composer',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('mbid', models.UUIDField(blank=True, null=True)),
                ('gender',
                 models.CharField(blank=True,
                                  choices=[('M', 'Male'), ('F', 'Female')],
                                  max_length=1,
                                  null=True)),
                ('begin', models.CharField(blank=True,
                                           max_length=10,
                                           null=True)),
                ('end', models.CharField(blank=True, max_length=10,
                                         null=True)),
                ('alias',
                 models.CharField(blank=True, max_length=200, null=True)),
                ('description',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='+',
                                   to='data.Description')),
                ('image',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='jingju_composer_image',
                                   to='data.Image')),
            ],
            options={
                'ordering': ['id'],
            },
            bases=(models.Model, data.models.ImageMixin),
        ),
        migrations.CreateModel(
            name='Instrument',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('percussion', models.BooleanField(default=False)),
                ('name', models.CharField(max_length=50)),
                ('mbid', models.UUIDField(blank=True, null=True)),
                ('hidden', models.BooleanField(default=False)),
                ('description',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='+',
                                   to='data.Description')),
                ('image',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='jingju_instrument_image',
                                   to='data.Image')),
            ],
            options={
                'ordering': ['id'],
            },
            bases=(models.Model, data.models.ImageMixin),
        ),
        migrations.CreateModel(
            name='Play',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('uuid', models.UUIDField(blank=True, null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Recording',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(blank=True, max_length=200, null=True)),
                ('mbid', models.UUIDField(blank=True, null=True)),
            ],
            options={
                'ordering': ['id'],
            },
            bases=(jingju.models.JingjuStyle, models.Model),
        ),
        migrations.CreateModel(
            name='RecordingInstrumentalist',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('artist',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='jingju.Artist')),
                ('instrument',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='jingju.Instrument')),
                ('recording',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='jingju.Recording')),
            ],
            bases=(jingju.models.JingjuStyle, models.Model),
        ),
        migrations.CreateModel(
            name='RecordingRelease',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('sequence', models.IntegerField(blank=True, null=True)),
                ('track', models.IntegerField(blank=True, null=True)),
                ('disc', models.IntegerField(blank=True, null=True)),
                ('disctrack', models.IntegerField(blank=True, null=True)),
                ('recording',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='jingju.Recording')),
            ],
            options={
                'ordering': ('track', ),
            },
        ),
        migrations.CreateModel(
            name='Release',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('mbid', models.UUIDField(blank=True, null=True)),
                ('title', models.CharField(max_length=100)),
                ('artistcredit', models.CharField(max_length=255)),
                ('year', models.IntegerField(blank=True, null=True)),
                ('status',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('rel_type',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('artists',
                 models.ManyToManyField(related_name='primary_concerts',
                                        to='jingju.Artist')),
                ('collection',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='data.Collection')),
                ('image',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='jingju_release_image',
                                   to='data.Image')),
                ('recordings',
                 models.ManyToManyField(through='jingju.RecordingRelease',
                                        to='jingju.Recording')),
            ],
            options={
                'ordering': ['id'],
            },
            bases=(jingju.models.JingjuStyle, models.Model,
                   data.models.ImageMixin),
        ),
        migrations.CreateModel(
            name='RoleType',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('code', models.CharField(db_index=True, max_length=10)),
                ('name', models.CharField(max_length=100)),
                ('romanisation', models.CharField(max_length=100)),
                ('uuid', models.UUIDField()),
                ('parent',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='jingju.RoleType')),
            ],
            options={
                'ordering': ['code'],
            },
        ),
        migrations.CreateModel(
            name='Score',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('source', models.CharField(max_length=100)),
                ('citation',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('citation_romanisation',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('uuid', models.UUIDField(blank=True, null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ShengqiangBanshi',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('code',
                 models.CharField(db_index=True, max_length=10, unique=True)),
                ('name', models.CharField(max_length=100)),
                ('romanisation', models.CharField(max_length=100)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Work',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(blank=True, max_length=200, null=True)),
                ('mbid', models.UUIDField(blank=True, null=True)),
                ('composers',
                 models.ManyToManyField(blank=True,
                                        related_name='works',
                                        to='jingju.Composer')),
                ('lyricists',
                 models.ManyToManyField(blank=True,
                                        related_name='lyric_works',
                                        to='jingju.Composer')),
                ('play',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='jingju.Play')),
                ('score',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='jingju.Score')),
            ],
            options={
                'ordering': ['id'],
            },
            bases=(jingju.models.JingjuStyle, models.Model),
        ),
        migrations.AddField(
            model_name='recordingrelease',
            name='release',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='jingju.Release'),
        ),
        migrations.AddField(
            model_name='recording',
            name='instrumentalists',
            field=models.ManyToManyField(
                related_name='instrumentalist',
                through='jingju.RecordingInstrumentalist',
                to='jingju.Artist'),
        ),
        migrations.AddField(
            model_name='recording',
            name='performers',
            field=models.ManyToManyField(to='jingju.Artist'),
        ),
        migrations.AddField(
            model_name='recording',
            name='shengqiangbanshi',
            field=models.ManyToManyField(to='jingju.ShengqiangBanshi'),
        ),
        migrations.AddField(
            model_name='recording',
            name='work',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='jingju.Work'),
        ),
        migrations.AddField(
            model_name='artist',
            name='instrument',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='jingju',
                to='jingju.Instrument'),
        ),
        migrations.AddField(
            model_name='artist',
            name='main_instrument',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='jingju.Instrument'),
        ),
        migrations.AddField(
            model_name='artist',
            name='role_type',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='jingju.RoleType'),
        ),
    ]
Exemplo n.º 9
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('data', '0003_auto_20180827_1752'),
    ]

    operations = [
        migrations.CreateModel(
            name='Artist',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('mbid', models.UUIDField(blank=True, null=True)),
                ('gender', models.CharField(blank=True, choices=[(b'M', b'Male'), (b'F', b'Female')], max_length=1, null=True)),
                ('begin', models.CharField(blank=True, max_length=10, null=True)),
                ('end', models.CharField(blank=True, max_length=10, null=True)),
                ('artist_type', models.CharField(choices=[(b'P', b'Person'), (b'G', b'Group')], default=b'P', max_length=1)),
                ('dummy', models.BooleanField(db_index=True, default=False)),
                ('description_edited', models.BooleanField(default=False)),
                ('description', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='data.Description')),
                ('group_members', models.ManyToManyField(blank=True, related_name='groups', to='jingju.Artist')),
                ('image', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='jingju_artist_image', to='data.Image')),
            ],
            options={
                'ordering': ['id'],
            },
            bases=(models.Model, data.models.ImageMixin),
        ),
        migrations.CreateModel(
            name='Instrument',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('percussion', models.BooleanField(default=False)),
                ('name', models.CharField(max_length=50)),
                ('mbid', models.UUIDField(blank=True, null=True)),
                ('hidden', models.BooleanField(default=False)),
                ('description', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='data.Description')),
                ('image', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='jingju_instrument_image', to='data.Image')),
            ],
            options={
                'ordering': ['id'],
            },
            bases=(models.Model, data.models.ImageMixin),
        ),
        migrations.CreateModel(
            name='Performer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('uuid', models.UUIDField()),
            ],
            options={
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='Play',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('uuid', models.UUIDField()),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Recording',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
            options={
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='RecordingArtist',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('artist', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='jingju.Artist')),
                ('instrument', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='jingju.Instrument')),
                ('recording', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='jingju.Recording')),
            ],
        ),
        migrations.CreateModel(
            name='RecordingPerformer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sequence', models.IntegerField(blank=True, null=True)),
                ('performer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='jingju.Performer')),
                ('recording', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='jingju.Recording')),
            ],
        ),
        migrations.CreateModel(
            name='RecordingRelease',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sequence', models.IntegerField(blank=True, null=True)),
                ('recording', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='jingju.Recording')),
            ],
        ),
        migrations.CreateModel(
            name='Release',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('mbid', models.UUIDField(blank=True, null=True)),
                ('title', models.CharField(max_length=100)),
                ('artistcredit', models.CharField(max_length=255)),
                ('year', models.IntegerField(blank=True, null=True)),
                ('status', models.CharField(blank=True, max_length=100, null=True)),
                ('rel_type', models.CharField(blank=True, max_length=100, null=True)),
                ('artists', models.ManyToManyField(related_name='primary_concerts', to='jingju.Artist')),
                ('image', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='jingju_release_image', to='data.Image')),
                ('performer', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='jingju.Performer')),
                ('recordings', models.ManyToManyField(through='jingju.RecordingRelease', to='jingju.Recording')),
            ],
            options={
                'ordering': ['id'],
            },
            bases=(models.Model, data.models.ImageMixin),
        ),
        migrations.CreateModel(
            name='Roletype',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Score',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('uuid', models.UUIDField()),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Work',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=200, null=True)),
                ('mbid', models.UUIDField(blank=True, null=True)),
                ('play', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='jingju.Play')),
                ('score', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='jingju.Score')),
            ],
            options={
                'ordering': ['id'],
            },
        ),
        migrations.AddField(
            model_name='recordingrelease',
            name='release',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='jingju.Release'),
        ),
        migrations.AddField(
            model_name='recording',
            name='instrumentalists',
            field=models.ManyToManyField(through='jingju.RecordingArtist', to='jingju.Artist'),
        ),
        migrations.AddField(
            model_name='recording',
            name='performer',
            field=models.ManyToManyField(through='jingju.RecordingPerformer', to='jingju.Performer'),
        ),
        migrations.AddField(
            model_name='recording',
            name='work',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='jingju.Work'),
        ),
        migrations.AddField(
            model_name='performer',
            name='roletype',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='jingju.Roletype'),
        ),
        migrations.AddField(
            model_name='artist',
            name='main_instrument',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='jingju.Instrument'),
        ),
    ]
Exemplo n.º 10
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('aplus_client', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Comparison',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('similarity', models.FloatField(default=0.0)),
                ('matches_json',
                 models.TextField(blank=True, default=None, null=True)),
                ('review',
                 models.IntegerField(choices=[(-10, 'False alert'),
                                              (0, 'Unspecified match'),
                                              (5, 'Suspicious match'),
                                              (10, 'Plagiate'),
                                              (1, 'Approved plagiate')],
                                     default=0)),
            ],
            options={
                'ordering': ['-similarity'],
            },
        ),
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('api_id', models.IntegerField()),
                ('url', models.URLField()),
                ('updated', models.DateTimeField(auto_now=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('key',
                 data.models.URLKeyField(
                     help_text='Unique alphanumeric course instance id',
                     max_length=64,
                     unique=True)),
                ('name',
                 models.CharField(help_text='Descriptive course name',
                                  max_length=128)),
                ('provider',
                 models.CharField(choices=[('a+', 'A+'),
                                           ('filesystem', 'File system')],
                                  default='a+',
                                  help_text='Provider for submission data',
                                  max_length=16)),
                ('tokenizer',
                 models.CharField(
                     choices=[('skip', 'Skip'), ('scala', 'Scala'),
                              ('python', 'Python')],
                     default='skip',
                     help_text='Tokenizer for the submission contents',
                     max_length=16)),
                ('minimum_match_tokens',
                 models.IntegerField(
                     default=15,
                     help_text='Minimum number of tokens to consider a match')
                 ),
                ('archived', models.BooleanField(db_index=True,
                                                 default=False)),
                ('namespace',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='aplus_client.ApiNamespace')),
                ('reviewers',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Reviewers for match analysis',
                     related_name='courses',
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-created'],
            },
        ),
        migrations.CreateModel(
            name='Exercise',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('key',
                 data.models.URLKeyField(help_text='Alphanumeric exercise id',
                                         max_length=64)),
                ('name',
                 models.CharField(default='unknown',
                                  help_text='Descriptive exercise name',
                                  max_length=128)),
                ('override_tokenizer',
                 models.CharField(blank=True,
                                  choices=[('skip', 'Skip'),
                                           ('scala', 'Scala'),
                                           ('python', 'Python')],
                                  max_length=8,
                                  null=True)),
                ('override_minimum_match_tokens',
                 models.IntegerField(blank=True, null=True)),
                ('template_tokens', models.TextField(blank=True, default='')),
                ('paused', models.BooleanField(default=False)),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='exercises',
                                   to='data.Course')),
            ],
            options={
                'ordering': ['course', 'name', 'created'],
            },
        ),
        migrations.CreateModel(
            name='ProviderQueue',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('data', models.CharField(max_length=128)),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='+',
                                   to='data.Course')),
            ],
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('key',
                 data.models.URLKeyField(help_text='Alphanumeric student id',
                                         max_length=64)),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='students',
                                   to='data.Course')),
            ],
            options={
                'ordering': ['course', 'key'],
            },
        ),
        migrations.CreateModel(
            name='Submission',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('provider_url',
                 models.CharField(blank=True,
                                  default=None,
                                  max_length=256,
                                  null=True)),
                ('grade', models.FloatField(default=0.0)),
                ('tokens', models.TextField(blank=True,
                                            default=None,
                                            null=True)),
                ('indexes_json',
                 models.TextField(blank=True, default=None, null=True)),
                ('authored_token_count',
                 models.IntegerField(blank=True, default=None, null=True)),
                ('longest_authored_tile',
                 models.IntegerField(blank=True, default=None, null=True)),
                ('max_similarity',
                 models.FloatField(blank=True,
                                   db_index=True,
                                   default=None,
                                   null=True)),
                ('exercise',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='submissions',
                                   to='data.Exercise')),
                ('student',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='submissions',
                                   to='data.Student')),
            ],
        ),
        migrations.AddField(
            model_name='comparison',
            name='submission_a',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='+',
                to='data.Submission'),
        ),
        migrations.AddField(
            model_name='comparison',
            name='submission_b',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='+',
                to='data.Submission'),
        ),
        migrations.AlterUniqueTogether(
            name='student',
            unique_together=set([('course', 'key')]),
        ),
        migrations.AlterUniqueTogether(
            name='exercise',
            unique_together=set([('course', 'key')]),
        ),
        migrations.AlterUniqueTogether(
            name='comparison',
            unique_together=set([('submission_a', 'submission_b')]),
        ),
    ]