# Generated by Django 2.1.1 on 2019-01-29 06:43

from django.conf import settings
import django.contrib.postgres.fields
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import simple_history.models
import varda.validators


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('auth', '0009_alter_user_last_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='Henkilo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('henkilotunnus', models.CharField(blank=True, max_length=120)),
                ('henkilotunnus_unique_hash', models.CharField(blank=True, max_length=80)),
                ('syntyma_pvm', models.DateField(blank=True, default=None, null=True)),
                ('henkilo_oid', models.CharField(blank=True, max_length=50, validators=[varda.validators.validate_henkilo_oid])),
                ('etunimet', models.CharField(max_length=100)),
                ('kutsumanimi', models.CharField(max_length=100)),
                ('sukunimi', models.CharField(max_length=100)),
                ('turvakielto', models.BooleanField(default=False)),
                ('vtj_yksiloity', models.BooleanField(default=False)),
                ('vtj_yksilointi_yritetty', models.BooleanField(default=False)),
                ('aidinkieli_koodi', models.CharField(blank=True, max_length=20, validators=[varda.validators.validate_kieli_koodi])),
                ('kotikunta_koodi', models.CharField(blank=True, max_length=20)),
                ('sukupuoli_koodi', models.CharField(blank=True, max_length=20, validators=[varda.validators.validate_sukupuoli_koodi])),
                ('katuosoite', models.CharField(blank=True, max_length=100)),
                ('postinumero', models.CharField(blank=True, max_length=20, validators=[varda.validators.validate_postinumero])),
                ('postitoimipaikka', models.CharField(blank=True, max_length=100)),
                ('luonti_pvm', models.DateTimeField(auto_now_add=True)),
                ('muutos_pvm', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name_plural': 'henkilöt',
            },
        ),
        migrations.CreateModel(
            name='HistoricalHenkilo',
            fields=[
                ('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
                ('henkilotunnus', models.CharField(blank=True, max_length=120)),
                ('henkilotunnus_unique_hash', models.CharField(blank=True, max_length=80)),
                ('syntyma_pvm', models.DateField(blank=True, default=None, null=True)),
                ('henkilo_oid', models.CharField(blank=True, max_length=50, validators=[varda.validators.validate_henkilo_oid])),
                ('etunimet', models.CharField(max_length=100)),
                ('kutsumanimi', models.CharField(max_length=100)),
                ('sukunimi', models.CharField(max_length=100)),
                ('turvakielto', models.BooleanField(default=False)),
                ('vtj_yksiloity', models.BooleanField(default=False)),
                ('vtj_yksilointi_yritetty', models.BooleanField(default=False)),
                ('aidinkieli_koodi', models.CharField(blank=True, max_length=20, validators=[varda.validators.validate_kieli_koodi])),
                ('kotikunta_koodi', models.CharField(blank=True, max_length=20)),
                ('sukupuoli_koodi', models.CharField(blank=True, max_length=20, validators=[varda.validators.validate_sukupuoli_koodi])),
                ('katuosoite', models.CharField(blank=True, max_length=100)),
                ('postinumero', models.CharField(blank=True, max_length=20, validators=[varda.validators.validate_postinumero])),
                ('postitoimipaikka', models.CharField(blank=True, max_length=100)),
                ('luonti_pvm', models.DateTimeField(blank=True, editable=False)),
                ('muutos_pvm', models.DateTimeField(blank=True, editable=False)),
                ('history_id', models.AutoField(primary_key=True, serialize=False)),
                ('history_change_reason', models.CharField(max_length=100, null=True)),
                ('history_date', models.DateTimeField()),
                ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
            ],
            options={
                'verbose_name': 'historical henkilo',
                'ordering': ('-history_date', '-history_id'),
                'get_latest_by': 'history_date',
            },
            bases=(simple_history.models.HistoricalChanges, models.Model),
        ),
        migrations.CreateModel(
            name='HistoricalHuoltaja',
            fields=[
                ('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
                ('alkamis_pvm', models.DateField()),
                ('paattymis_pvm', models.DateField(blank=True, default=None, null=True)),
                ('luonti_pvm', models.DateTimeField(blank=True, editable=False)),
                ('muutos_pvm', models.DateTimeField(blank=True, editable=False)),
                ('history_id', models.AutoField(primary_key=True, serialize=False)),
                ('history_change_reason', models.CharField(max_length=100, null=True)),
                ('history_date', models.DateTimeField()),
                ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
            ],
            options={
                'verbose_name': 'historical huoltaja',
                'ordering': ('-history_date', '-history_id'),
                'get_latest_by': 'history_date',
            },
            bases=(simple_history.models.HistoricalChanges, models.Model),
        ),
        migrations.CreateModel(
            name='HistoricalKieliPainotus',
            fields=[
                ('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
                ('kielipainotus_koodi', models.CharField(max_length=4, validators=[varda.validators.validate_kieli_koodi])),
                ('alkamis_pvm', models.DateField()),
                ('paattymis_pvm', models.DateField(blank=True, default=None, null=True)),
                ('luonti_pvm', models.DateTimeField(blank=True, editable=False)),
                ('muutos_pvm', models.DateTimeField(blank=True, editable=False)),
                ('history_id', models.AutoField(primary_key=True, serialize=False)),
                ('history_change_reason', models.CharField(max_length=100, null=True)),
                ('history_date', models.DateTimeField()),
                ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
            ],
            options={
                'verbose_name': 'historical kieli painotus',
                'ordering': ('-history_date', '-history_id'),
                'get_latest_by': 'history_date',
            },
            bases=(simple_history.models.HistoricalChanges, models.Model),
        ),
        migrations.CreateModel(
            name='HistoricalLapsi',
            fields=[
                ('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
                ('luonti_pvm', models.DateTimeField(blank=True, editable=False)),
                ('muutos_pvm', models.DateTimeField(blank=True, editable=False)),
                ('history_id', models.AutoField(primary_key=True, serialize=False)),
                ('history_change_reason', models.CharField(max_length=100, null=True)),
                ('history_date', models.DateTimeField()),
                ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
            ],
            options={
                'verbose_name': 'historical lapsi',
                'ordering': ('-history_date', '-history_id'),
                'get_latest_by': 'history_date',
            },
            bases=(simple_history.models.HistoricalChanges, models.Model),
        ),
        migrations.CreateModel(
            name='HistoricalOhjaajasuhde',
            fields=[
                ('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
                ('tyotehtava_koodi', models.CharField(max_length=50, validators=[varda.validators.validate_tyotehtava_koodi])),
                ('tyoaika_viikossa', models.DecimalField(decimal_places=1, max_digits=4, validators=[django.core.validators.MinValueValidator(0.0), django.core.validators.MaxValueValidator(100)])),
                ('alkamis_pvm', models.DateField()),
                ('paattymis_pvm', models.DateField(blank=True, default=None, null=True)),
                ('luonti_pvm', models.DateTimeField(blank=True, editable=False)),
                ('muutos_pvm', models.DateTimeField(blank=True, editable=False)),
                ('history_id', models.AutoField(primary_key=True, serialize=False)),
                ('history_change_reason', models.CharField(max_length=100, null=True)),
                ('history_date', models.DateTimeField()),
                ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
            ],
            options={
                'verbose_name': 'historical ohjaajasuhde',
                'ordering': ('-history_date', '-history_id'),
                'get_latest_by': 'history_date',
            },
            bases=(simple_history.models.HistoricalChanges, models.Model),
        ),
        migrations.CreateModel(
            name='HistoricalTaydennyskoulutus',
            fields=[
                ('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
                ('tuntimaara', models.DecimalField(decimal_places=1, max_digits=3, validators=[django.core.validators.MinValueValidator(0.0)])),
                ('suoritus_pvm', models.DateField()),
                ('luonti_pvm', models.DateTimeField(blank=True, editable=False)),
                ('muutos_pvm', models.DateTimeField(blank=True, editable=False)),
                ('history_id', models.AutoField(primary_key=True, serialize=False)),
                ('history_change_reason', models.CharField(max_length=100, null=True)),
                ('history_date', models.DateTimeField()),
                ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
            ],
            options={
                'verbose_name': 'historical taydennyskoulutus',
                'ordering': ('-history_date', '-history_id'),
                'get_latest_by': 'history_date',
            },
            bases=(simple_history.models.HistoricalChanges, models.Model),
        ),
        migrations.CreateModel(
            name='HistoricalToiminnallinenPainotus',
            fields=[
                ('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
                ('toimintapainotus_koodi', models.CharField(max_length=6, validators=[varda.validators.validate_toimintapainotus_koodi])),
                ('alkamis_pvm', models.DateField()),
                ('paattymis_pvm', models.DateField(blank=True, default=None, null=True)),
                ('luonti_pvm', models.DateTimeField(blank=True, editable=False)),
                ('muutos_pvm', models.DateTimeField(blank=True, editable=False)),
                ('history_id', models.AutoField(primary_key=True, serialize=False)),
                ('history_change_reason', models.CharField(max_length=100, null=True)),
                ('history_date', models.DateTimeField()),
                ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
            ],
            options={
                'verbose_name': 'historical toiminnallinen painotus',
                'ordering': ('-history_date', '-history_id'),
                'get_latest_by': 'history_date',
            },
            bases=(simple_history.models.HistoricalChanges, models.Model),
        ),
        migrations.CreateModel(
            name='HistoricalToimipaikka',
            fields=[
                ('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
                ('nimi', models.CharField(max_length=200)),
                ('nimi_sv', models.CharField(blank=True, max_length=200)),
                ('organisaatio_oid', models.CharField(blank=True, max_length=50, validators=[varda.validators.validate_organisaatio_oid])),
                ('kayntiosoite', models.CharField(max_length=100)),
                ('kayntiosoite_postinumero', models.CharField(max_length=10, validators=[varda.validators.validate_postinumero])),
                ('kayntiosoite_postitoimipaikka', models.CharField(max_length=50)),
                ('postiosoite', models.CharField(max_length=100)),
                ('postinumero', models.CharField(max_length=20, validators=[varda.validators.validate_postinumero])),
                ('postitoimipaikka', models.CharField(max_length=100)),
                ('kunta_koodi', models.CharField(max_length=20, validators=[varda.validators.validate_kunta_koodi])),
                ('puhelinnumero', models.CharField(max_length=20, validators=[varda.validators.validate_puhelinnumero])),
                ('sahkopostiosoite', models.EmailField(max_length=200)),
                ('kasvatusopillinen_jarjestelma_koodi', models.CharField(max_length=100, validators=[varda.validators.validate_kasvatusopillinen_jarjestelma_koodi])),
                ('toimintamuoto_koodi', models.CharField(max_length=50, validators=[varda.validators.validate_toimintamuoto_koodi])),
                ('asiointikieli_koodi', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=50, validators=[varda.validators.validate_kieli_koodi]), size=None, validators=[varda.validators.validate_arrayfield])),
                ('jarjestamismuoto_koodi', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=50, validators=[varda.validators.validate_jarjestamismuoto_koodi]), size=None, validators=[varda.validators.validate_arrayfield])),
                ('varhaiskasvatuspaikat', models.PositiveSmallIntegerField()),
                ('toiminnallinenpainotus_kytkin', models.BooleanField(default=False)),
                ('kielipainotus_kytkin', models.BooleanField(default=False)),
                ('alkamis_pvm', models.DateField()),
                ('paattymis_pvm', models.DateField(blank=True, default=None, null=True)),
                ('luonti_pvm', models.DateTimeField(blank=True, editable=False)),
                ('muutos_pvm', models.DateTimeField(blank=True, editable=False)),
                ('history_id', models.AutoField(primary_key=True, serialize=False)),
                ('history_change_reason', models.CharField(max_length=100, null=True)),
                ('history_date', models.DateTimeField()),
                ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
            ],
            options={
                'verbose_name': 'historical toimipaikka',
                'ordering': ('-history_date', '-history_id'),
                'get_latest_by': 'history_date',
            },
            bases=(simple_history.models.HistoricalChanges, models.Model),
        ),
        migrations.CreateModel(
            name='HistoricalTyontekija',
            fields=[
                ('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
                ('tyosuhde_koodi', models.CharField(max_length=20, validators=[varda.validators.validate_tyosuhde_koodi])),
                ('tyoaika_koodi', models.CharField(max_length=20, validators=[varda.validators.validate_tyoaika_koodi])),
                ('tutkintonimike_koodi', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=50, validators=[varda.validators.validate_tutkintonimike_koodi]), size=None, validators=[varda.validators.validate_arrayfield])),
                ('alkamis_pvm', models.DateField()),
                ('paattymis_pvm', models.DateField(blank=True, default=None, null=True)),
                ('luonti_pvm', models.DateTimeField(blank=True, editable=False)),
                ('muutos_pvm', models.DateTimeField(blank=True, editable=False)),
                ('history_id', models.AutoField(primary_key=True, serialize=False)),
                ('history_change_reason', models.CharField(max_length=100, null=True)),
                ('history_date', models.DateTimeField()),
                ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
            ],
            options={
                'verbose_name': 'historical tyontekija',
                'ordering': ('-history_date', '-history_id'),
                'get_latest_by': 'history_date',
            },
            bases=(simple_history.models.HistoricalChanges, models.Model),
        ),
        migrations.CreateModel(
            name='HistoricalVakaJarjestaja',
            fields=[
                ('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
                ('nimi', models.CharField(max_length=100)),
                ('y_tunnus', models.CharField(max_length=20, validators=[varda.validators.validate_y_tunnus])),
                ('organisaatio_oid', models.CharField(blank=True, db_index=True, max_length=50, null=True, validators=[varda.validators.validate_organisaatio_oid])),
                ('kunta_koodi', models.CharField(max_length=20, validators=[varda.validators.validate_kunta_koodi])),
                ('sahkopostiosoite', models.EmailField(blank=True, max_length=200, null=True)),
                ('tilinumero', models.CharField(blank=True, max_length=25, validators=[varda.validators.validate_IBAN_koodi])),
                ('ipv4_osoitteet', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(blank=True, max_length=20, validators=[varda.validators.validate_ipv4_address]), blank=True, null=True, size=None)),
                ('ipv6_osoitteet', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(blank=True, max_length=50, validators=[varda.validators.validate_ipv6_address]), blank=True, null=True, size=None)),
                ('kayntiosoite', models.CharField(blank=True, max_length=100)),
                ('kayntiosoite_postinumero', models.CharField(blank=True, max_length=10, validators=[varda.validators.validate_postinumero])),
                ('kayntiosoite_postitoimipaikka', models.CharField(blank=True, max_length=50)),
                ('postiosoite', models.CharField(max_length=100)),
                ('postinumero', models.CharField(max_length=10, validators=[varda.validators.validate_postinumero])),
                ('postitoimipaikka', models.CharField(max_length=50)),
                ('puhelinnumero', models.CharField(blank=True, max_length=20, validators=[varda.validators.validate_puhelinnumero])),
                ('ytjkieli', models.CharField(blank=True, max_length=5)),
                ('alkamis_pvm', models.DateField(blank=True, null=True)),
                ('paattymis_pvm', models.DateField(blank=True, default=None, null=True)),
                ('integraatio_organisaatio', models.BooleanField(default=False)),
                ('luonti_pvm', models.DateTimeField(blank=True, editable=False)),
                ('muutos_pvm', models.DateTimeField(blank=True, editable=False)),
                ('history_id', models.AutoField(primary_key=True, serialize=False)),
                ('history_change_reason', models.CharField(max_length=100, null=True)),
                ('history_date', models.DateTimeField()),
                ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
            ],
            options={
                'verbose_name': 'historical vaka jarjestaja',
                'ordering': ('-history_date', '-history_id'),
                'get_latest_by': 'history_date',
            },
            bases=(simple_history.models.HistoricalChanges, models.Model),
        ),
        migrations.CreateModel(
            name='HistoricalVarhaiskasvatuspaatos',
            fields=[
                ('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
                ('vuorohoito_kytkin', models.BooleanField(default=False)),
                ('pikakasittely_kytkin', models.BooleanField(default=False)),
                ('tuntimaara_viikossa', models.DecimalField(decimal_places=1, max_digits=4, validators=[django.core.validators.MinValueValidator(0.0), django.core.validators.MaxValueValidator(120.0)])),
                ('paivittainen_vaka_kytkin', models.BooleanField(null=True)),
                ('kokopaivainen_vaka_kytkin', models.BooleanField(null=True)),
                ('jarjestamismuoto_koodi', models.CharField(max_length=50, validators=[varda.validators.validate_jarjestamismuoto_koodi])),
                ('hakemus_pvm', models.DateField()),
                ('alkamis_pvm', models.DateField()),
                ('paattymis_pvm', models.DateField(blank=True, default=None, null=True)),
                ('luonti_pvm', models.DateTimeField(blank=True, editable=False)),
                ('muutos_pvm', models.DateTimeField(blank=True, editable=False)),
                ('history_id', models.AutoField(primary_key=True, serialize=False)),
                ('history_change_reason', models.CharField(max_length=100, null=True)),
                ('history_date', models.DateTimeField()),
                ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
            ],
            options={
                'verbose_name': 'historical varhaiskasvatuspaatos',
                'ordering': ('-history_date', '-history_id'),
                'get_latest_by': 'history_date',
            },
            bases=(simple_history.models.HistoricalChanges, models.Model),
        ),
        migrations.CreateModel(
            name='HistoricalVarhaiskasvatussuhde',
            fields=[
                ('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
                ('alkamis_pvm', models.DateField()),
                ('paattymis_pvm', models.DateField(blank=True, default=None, null=True)),
                ('luonti_pvm', models.DateTimeField(blank=True, editable=False)),
                ('muutos_pvm', models.DateTimeField(blank=True, editable=False)),
                ('history_id', models.AutoField(primary_key=True, serialize=False)),
                ('history_change_reason', models.CharField(max_length=100, null=True)),
                ('history_date', models.DateTimeField()),
                ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
            ],
            options={
                'verbose_name': 'historical varhaiskasvatussuhde',
                'ordering': ('-history_date', '-history_id'),
                'get_latest_by': 'history_date',
            },
            bases=(simple_history.models.HistoricalChanges, models.Model),
        ),
        migrations.CreateModel(
            name='Huoltaja',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('alkamis_pvm', models.DateField()),
                ('paattymis_pvm', models.DateField(blank=True, default=None, null=True)),
                ('luonti_pvm', models.DateTimeField(auto_now_add=True)),
                ('muutos_pvm', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name_plural': 'huoltajat',
            },
        ),
        migrations.CreateModel(
            name='KieliPainotus',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('kielipainotus_koodi', models.CharField(max_length=4, validators=[varda.validators.validate_kieli_koodi])),
                ('alkamis_pvm', models.DateField()),
                ('paattymis_pvm', models.DateField(blank=True, default=None, null=True)),
                ('luonti_pvm', models.DateTimeField(auto_now_add=True)),
                ('muutos_pvm', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name_plural': 'kielipainotukset',
            },
        ),
        migrations.CreateModel(
            name='Lapsi',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('luonti_pvm', models.DateTimeField(auto_now_add=True)),
                ('muutos_pvm', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name_plural': 'lapset',
            },
        ),
        migrations.CreateModel(
            name='Maksupaatos',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
            options={
                'verbose_name_plural': 'maksupaatokset',
            },
        ),
        migrations.CreateModel(
            name='Ohjaajasuhde',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tyotehtava_koodi', models.CharField(max_length=50, validators=[varda.validators.validate_tyotehtava_koodi])),
                ('tyoaika_viikossa', models.DecimalField(decimal_places=1, max_digits=4, validators=[django.core.validators.MinValueValidator(0.0), django.core.validators.MaxValueValidator(100)])),
                ('alkamis_pvm', models.DateField()),
                ('paattymis_pvm', models.DateField(blank=True, default=None, null=True)),
                ('luonti_pvm', models.DateTimeField(auto_now_add=True)),
                ('muutos_pvm', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name_plural': 'ohjaajasuhteet',
            },
        ),
        migrations.CreateModel(
            name='Taydennyskoulutus',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tuntimaara', models.DecimalField(decimal_places=1, max_digits=3, validators=[django.core.validators.MinValueValidator(0.0)])),
                ('suoritus_pvm', models.DateField()),
                ('luonti_pvm', models.DateTimeField(auto_now_add=True)),
                ('muutos_pvm', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name_plural': 'täydennyskoulutukset',
            },
        ),
        migrations.CreateModel(
            name='ToiminnallinenPainotus',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('toimintapainotus_koodi', models.CharField(max_length=6, validators=[varda.validators.validate_toimintapainotus_koodi])),
                ('alkamis_pvm', models.DateField()),
                ('paattymis_pvm', models.DateField(blank=True, default=None, null=True)),
                ('luonti_pvm', models.DateTimeField(auto_now_add=True)),
                ('muutos_pvm', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name_plural': 'toiminnalliset painotukset',
            },
        ),
        migrations.CreateModel(
            name='Toimipaikka',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nimi', models.CharField(max_length=200)),
                ('nimi_sv', models.CharField(blank=True, max_length=200)),
                ('organisaatio_oid', models.CharField(blank=True, max_length=50, validators=[varda.validators.validate_organisaatio_oid])),
                ('kayntiosoite', models.CharField(max_length=100)),
                ('kayntiosoite_postinumero', models.CharField(max_length=10, validators=[varda.validators.validate_postinumero])),
                ('kayntiosoite_postitoimipaikka', models.CharField(max_length=50)),
                ('postiosoite', models.CharField(max_length=100)),
                ('postinumero', models.CharField(max_length=20, validators=[varda.validators.validate_postinumero])),
                ('postitoimipaikka', models.CharField(max_length=100)),
                ('kunta_koodi', models.CharField(max_length=20, validators=[varda.validators.validate_kunta_koodi])),
                ('puhelinnumero', models.CharField(max_length=20, validators=[varda.validators.validate_puhelinnumero])),
                ('sahkopostiosoite', models.EmailField(max_length=200)),
                ('kasvatusopillinen_jarjestelma_koodi', models.CharField(max_length=100, validators=[varda.validators.validate_kasvatusopillinen_jarjestelma_koodi])),
                ('toimintamuoto_koodi', models.CharField(max_length=50, validators=[varda.validators.validate_toimintamuoto_koodi])),
                ('asiointikieli_koodi', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=50, validators=[varda.validators.validate_kieli_koodi]), size=None, validators=[varda.validators.validate_arrayfield])),
                ('jarjestamismuoto_koodi', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=50, validators=[varda.validators.validate_jarjestamismuoto_koodi]), size=None, validators=[varda.validators.validate_arrayfield])),
                ('varhaiskasvatuspaikat', models.PositiveSmallIntegerField()),
                ('toiminnallinenpainotus_kytkin', models.BooleanField(default=False)),
                ('kielipainotus_kytkin', models.BooleanField(default=False)),
                ('alkamis_pvm', models.DateField()),
                ('paattymis_pvm', models.DateField(blank=True, default=None, null=True)),
                ('luonti_pvm', models.DateTimeField(auto_now_add=True)),
                ('muutos_pvm', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name_plural': 'toimipaikat',
            },
        ),
        migrations.CreateModel(
            name='Tyontekija',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tyosuhde_koodi', models.CharField(max_length=20, validators=[varda.validators.validate_tyosuhde_koodi])),
                ('tyoaika_koodi', models.CharField(max_length=20, validators=[varda.validators.validate_tyoaika_koodi])),
                ('tutkintonimike_koodi', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=50, validators=[varda.validators.validate_tutkintonimike_koodi]), size=None, validators=[varda.validators.validate_arrayfield])),
                ('alkamis_pvm', models.DateField()),
                ('paattymis_pvm', models.DateField(blank=True, default=None, null=True)),
                ('luonti_pvm', models.DateTimeField(auto_now_add=True)),
                ('muutos_pvm', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name_plural': 'työntekijät',
            },
        ),
        migrations.CreateModel(
            name='VakaJarjestaja',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nimi', models.CharField(max_length=100)),
                ('y_tunnus', models.CharField(max_length=20, validators=[varda.validators.validate_y_tunnus])),
                ('organisaatio_oid', models.CharField(blank=True, max_length=50, null=True, unique=True, validators=[varda.validators.validate_organisaatio_oid])),
                ('kunta_koodi', models.CharField(max_length=20, validators=[varda.validators.validate_kunta_koodi])),
                ('sahkopostiosoite', models.EmailField(blank=True, max_length=200, null=True)),
                ('tilinumero', models.CharField(blank=True, max_length=25, validators=[varda.validators.validate_IBAN_koodi])),
                ('ipv4_osoitteet', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(blank=True, max_length=20, validators=[varda.validators.validate_ipv4_address]), blank=True, null=True, size=None)),
                ('ipv6_osoitteet', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(blank=True, max_length=50, validators=[varda.validators.validate_ipv6_address]), blank=True, null=True, size=None)),
                ('kayntiosoite', models.CharField(blank=True, max_length=100)),
                ('kayntiosoite_postinumero', models.CharField(blank=True, max_length=10, validators=[varda.validators.validate_postinumero])),
                ('kayntiosoite_postitoimipaikka', models.CharField(blank=True, max_length=50)),
                ('postiosoite', models.CharField(max_length=100)),
                ('postinumero', models.CharField(max_length=10, validators=[varda.validators.validate_postinumero])),
                ('postitoimipaikka', models.CharField(max_length=50)),
                ('puhelinnumero', models.CharField(blank=True, max_length=20, validators=[varda.validators.validate_puhelinnumero])),
                ('ytjkieli', models.CharField(blank=True, max_length=5)),
                ('alkamis_pvm', models.DateField(blank=True, null=True)),
                ('paattymis_pvm', models.DateField(blank=True, default=None, null=True)),
                ('integraatio_organisaatio', models.BooleanField(default=False)),
                ('luonti_pvm', models.DateTimeField(auto_now_add=True)),
                ('muutos_pvm', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name_plural': 'vakajarjestajat',
            },
        ),
        migrations.CreateModel(
            name='Varhaiskasvatuspaatos',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('vuorohoito_kytkin', models.BooleanField(default=False)),
                ('pikakasittely_kytkin', models.BooleanField(default=False)),
                ('tuntimaara_viikossa', models.DecimalField(decimal_places=1, max_digits=4, validators=[django.core.validators.MinValueValidator(0.0), django.core.validators.MaxValueValidator(120.0)])),
                ('paivittainen_vaka_kytkin', models.BooleanField(null=True)),
                ('kokopaivainen_vaka_kytkin', models.BooleanField(null=True)),
                ('jarjestamismuoto_koodi', models.CharField(max_length=50, validators=[varda.validators.validate_jarjestamismuoto_koodi])),
                ('hakemus_pvm', models.DateField()),
                ('alkamis_pvm', models.DateField()),
                ('paattymis_pvm', models.DateField(blank=True, default=None, null=True)),
                ('luonti_pvm', models.DateTimeField(auto_now_add=True)),
                ('muutos_pvm', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name_plural': 'varhaiskasvatuspaatokset',
            },
        ),
        migrations.CreateModel(
            name='Varhaiskasvatussuhde',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('alkamis_pvm', models.DateField()),
                ('paattymis_pvm', models.DateField(blank=True, default=None, null=True)),
                ('luonti_pvm', models.DateTimeField(auto_now_add=True)),
                ('muutos_pvm', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name_plural': 'varhaiskasvatussuhteet',
            },
        ),
        migrations.CreateModel(
            name='Z1_OphAuthentication',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ticketing_granting_ticket', models.CharField(blank=True, max_length=300)),
            ],
            options={
                'verbose_name_plural': 'OPH autentikaatio',
            },
        ),
        migrations.CreateModel(
            name='Z2_Koodisto',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('kunta_koodit', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=10), size=None)),
                ('kieli_koodit', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=10), size=None)),
                ('jarjestamismuoto_koodit', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=10), size=None)),
                ('toimintamuoto_koodit', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=10), size=None)),
                ('kasvatusopillinen_jarjestelma_koodit', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=10), size=None)),
                ('toiminnallinen_painotus_koodit', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=10), size=None)),
                ('tutkintonimike_koodit', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=10), size=None)),
                ('tyosuhde_koodit', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=10), size=None)),
                ('tyoaika_koodit', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=10), size=None)),
                ('tyotehtava_koodit', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=10), size=None)),
                ('sukupuoli_koodit', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=10), size=None)),
                ('opiskeluoikeuden_tila_koodit', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=30), size=None)),
                ('tutkinto_koodit', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=10), size=None)),
            ],
            options={
                'verbose_name_plural': 'VARDA koodistot',
            },
        ),
        migrations.CreateModel(
            name='Z3_AdditionalCasUserFields',
            fields=[
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, primary_key=True, related_name='additional_user_info', serialize=False, to=settings.AUTH_USER_MODEL)),
                ('kayttajatyyppi', models.CharField(blank=True, max_length=50)),
                ('henkilo_oid', models.CharField(blank=True, max_length=50, unique=True, validators=[varda.validators.validate_henkilo_oid])),
                ('asiointikieli_koodi', models.CharField(blank=True, max_length=3)),
                ('approved_oph_staff', models.BooleanField(default=False)),
                ('last_modified', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name_plural': 'Additional user fields',
            },
        ),
        migrations.CreateModel(
            name='Z4_CasKayttoOikeudet',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('organisaatio_oid', models.CharField(blank=True, max_length=50, validators=[varda.validators.validate_organisaatio_oid])),
                ('kayttooikeus', models.CharField(blank=True, choices=[('VARDA-PAAKAYTTAJA', 'Varda-Pääkäyttäjä'), ('VARDA-TALLENTAJA', 'Varda-Tallentaja'), ('VARDA-KATSELIJA', 'Varda-Katselija'), ('VARDA-PALVELUKAYTTAJA', 'Varda-Palvelukäyttäjä')], max_length=22)),
                ('last_modified', models.DateTimeField(auto_now=True)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='kayttooikeudet', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'Kayttooikeudet',
            },
        ),
        migrations.CreateModel(
            name='Z5_AuditLog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('time_of_event', models.DateTimeField(auto_now=True)),
                ('successful_get_request_path', models.CharField(max_length=100)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='audit_log', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'Audit log',
            },
        ),
        migrations.AddField(
            model_name='varhaiskasvatussuhde',
            name='changed_by',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='varhaiskasvatussuhteet', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='varhaiskasvatussuhde',
            name='toimipaikka',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='varhaiskasvatussuhteet', to='varda.Toimipaikka'),
        ),
        migrations.AddField(
            model_name='varhaiskasvatussuhde',
            name='varhaiskasvatuspaatos',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='varhaiskasvatussuhteet', to='varda.Varhaiskasvatuspaatos'),
        ),
        migrations.AddField(
            model_name='varhaiskasvatuspaatos',
            name='changed_by',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='varhaiskasvatuspaatokset', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='varhaiskasvatuspaatos',
            name='lapsi',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='varhaiskasvatuspaatokset', to='varda.Lapsi'),
        ),
        migrations.AddField(
            model_name='vakajarjestaja',
            name='changed_by',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='vakajarjestajat', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='tyontekija',
            name='changed_by',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='tyontekijat', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='tyontekija',
            name='henkilo',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='tyontekijat', to='varda.Henkilo'),
        ),
        migrations.AddField(
            model_name='toimipaikka',
            name='changed_by',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='toimipaikat', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='toimipaikka',
            name='vakajarjestaja',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='toimipaikat', to='varda.VakaJarjestaja'),
        ),
        migrations.AddField(
            model_name='toiminnallinenpainotus',
            name='changed_by',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='toiminnallisetpainotukset', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='toiminnallinenpainotus',
            name='toimipaikka',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='toiminnallisetpainotukset', to='varda.Toimipaikka'),
        ),
        migrations.AddField(
            model_name='taydennyskoulutus',
            name='changed_by',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='taydennyskoulutukset', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='taydennyskoulutus',
            name='tyontekija',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='taydennyskoulutukset', to='varda.Tyontekija'),
        ),
        migrations.AddField(
            model_name='ohjaajasuhde',
            name='changed_by',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='ohjaajasuhteet', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='ohjaajasuhde',
            name='toimipaikka',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='ohjaajasuhteet', to='varda.Toimipaikka'),
        ),
        migrations.AddField(
            model_name='ohjaajasuhde',
            name='tyontekija',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='ohjaajasuhteet', to='varda.Tyontekija'),
        ),
        migrations.AddField(
            model_name='maksupaatos',
            name='changed_by',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='maksupaatokset', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='lapsi',
            name='changed_by',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='lapset', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='lapsi',
            name='henkilo',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='lapsi', to='varda.Henkilo'),
        ),
        migrations.AddField(
            model_name='kielipainotus',
            name='changed_by',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='kielipainotukset', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='kielipainotus',
            name='toimipaikka',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='kielipainotukset', to='varda.Toimipaikka'),
        ),
        migrations.AddField(
            model_name='huoltaja',
            name='changed_by',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='huoltajat', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='huoltaja',
            name='henkilo',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='huoltaja', to='varda.Henkilo'),
        ),
        migrations.AddField(
            model_name='huoltaja',
            name='lapset',
            field=models.ManyToManyField(related_name='huoltajat', to='varda.Lapsi'),
        ),
        migrations.AddField(
            model_name='historicalvarhaiskasvatussuhde',
            name='changed_by',
            field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='historicalvarhaiskasvatussuhde',
            name='history_user',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='historicalvarhaiskasvatussuhde',
            name='toimipaikka',
            field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='varda.Toimipaikka'),
        ),
        migrations.AddField(
            model_name='historicalvarhaiskasvatussuhde',
            name='varhaiskasvatuspaatos',
            field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='varda.Varhaiskasvatuspaatos'),
        ),
        migrations.AddField(
            model_name='historicalvarhaiskasvatuspaatos',
            name='changed_by',
            field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='historicalvarhaiskasvatuspaatos',
            name='history_user',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='historicalvarhaiskasvatuspaatos',
            name='lapsi',
            field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='varda.Lapsi'),
        ),
        migrations.AddField(
            model_name='historicalvakajarjestaja',
            name='changed_by',
            field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='historicalvakajarjestaja',
            name='history_user',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='historicaltyontekija',
            name='changed_by',
            field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='historicaltyontekija',
            name='henkilo',
            field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='varda.Henkilo'),
        ),
        migrations.AddField(
            model_name='historicaltyontekija',
            name='history_user',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='historicaltoimipaikka',
            name='changed_by',
            field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='historicaltoimipaikka',
            name='history_user',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='historicaltoimipaikka',
            name='vakajarjestaja',
            field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='varda.VakaJarjestaja'),
        ),
        migrations.AddField(
            model_name='historicaltoiminnallinenpainotus',
            name='changed_by',
            field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='historicaltoiminnallinenpainotus',
            name='history_user',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='historicaltoiminnallinenpainotus',
            name='toimipaikka',
            field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='varda.Toimipaikka'),
        ),
        migrations.AddField(
            model_name='historicaltaydennyskoulutus',
            name='changed_by',
            field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='historicaltaydennyskoulutus',
            name='history_user',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='historicaltaydennyskoulutus',
            name='tyontekija',
            field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='varda.Tyontekija'),
        ),
        migrations.AddField(
            model_name='historicalohjaajasuhde',
            name='changed_by',
            field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='historicalohjaajasuhde',
            name='history_user',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='historicalohjaajasuhde',
            name='toimipaikka',
            field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='varda.Toimipaikka'),
        ),
        migrations.AddField(
            model_name='historicalohjaajasuhde',
            name='tyontekija',
            field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='varda.Tyontekija'),
        ),
        migrations.AddField(
            model_name='historicallapsi',
            name='changed_by',
            field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='historicallapsi',
            name='henkilo',
            field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='varda.Henkilo'),
        ),
        migrations.AddField(
            model_name='historicallapsi',
            name='history_user',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='historicalkielipainotus',
            name='changed_by',
            field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='historicalkielipainotus',
            name='history_user',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='historicalkielipainotus',
            name='toimipaikka',
            field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='varda.Toimipaikka'),
        ),
        migrations.AddField(
            model_name='historicalhuoltaja',
            name='changed_by',
            field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='historicalhuoltaja',
            name='henkilo',
            field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='varda.Henkilo'),
        ),
        migrations.AddField(
            model_name='historicalhuoltaja',
            name='history_user',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='historicalhenkilo',
            name='changed_by',
            field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='historicalhenkilo',
            name='history_user',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='henkilo',
            name='changed_by',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='henkilot', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterUniqueTogether(
            name='z4_caskayttooikeudet',
            unique_together={('user', 'organisaatio_oid')},
        ),
        migrations.AlterUniqueTogether(
            name='toimipaikka',
            unique_together={('nimi', 'vakajarjestaja')},
        ),
    ]
