# Generated by Django 3.2.4 on 2021-08-23 07:08

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('core', '0018_extructresource'),
    ]

    operations = [
        migrations.CreateModel(
            name='ExtractionMapping',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='develop', max_length=100)),
                ('repository', models.CharField(choices=[('edurep.EdurepOAIPMH', 'Edurep'), ('sharekit.SharekitMetadataHarvest', 'Sharekit')], max_length=50)),
                ('root', models.CharField(default='$', max_length=256)),
                ('is_active', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='ExtractionMethod',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('method', models.CharField(max_length=256)),
                ('processor', models.CharField(max_length=256)),
            ],
        ),
        migrations.CreateModel(
            name='JSONExtractionField',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('path', models.CharField(max_length=256)),
            ],
        ),
        migrations.CreateModel(
            name='MethodExtractionField',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('method', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.extractionmethod')),
            ],
        ),
        migrations.CreateModel(
            name='ObjectiveProperty',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('property', models.CharField(choices=[('publisher_date', 'publisher_date'), ('material_types', 'material_types'), ('copyright_description', 'copyright_description'), ('technical_type', 'technical_type'), ('has_parts', 'has_parts'), ('keywords', 'keywords'), ('disciplines', 'disciplines'), ('aggregation_level', 'aggregation_level'), ('publishers', 'publishers'), ('description', 'description'), ('lowest_educational_level', 'lowest_educational_level'), ('authors', 'authors'), ('parties', 'parties'), ('title', 'title'), ('from_youtube', 'from_youtube'), ('is_restricted', 'is_restricted'), ('language', 'language'), ('analysis_allowed', 'analysis_allowed'), ('ideas', 'ideas'), ('research_themes', 'research_themes'), ('is_part_of', 'is_part_of'), ('research_object_type', 'research_object_type'), ('mime_type', 'mime_type'), ('url', 'url'), ('copyright', 'copyright'), ('doi', 'doi'), ('files', 'files'), ('lom_educational_levels', 'lom_educational_levels')], max_length=50)),
                ('is_context', models.BooleanField(default=False)),
                ('json_field', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='core.jsonextractionfield')),
                ('mapping', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.extractionmapping')),
                ('method_field', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='core.methodextractionfield')),
            ],
            options={
                'verbose_name_plural': 'objective properties',
            },
        ),
        migrations.AddField(
            model_name='extractionmapping',
            name='json_fields',
            field=models.ManyToManyField(related_name='_core_extractionmapping_json_fields_+', through='core.ObjectiveProperty', to='core.JSONExtractionField'),
        ),
        migrations.AddField(
            model_name='extractionmapping',
            name='method_fields',
            field=models.ManyToManyField(related_name='_core_extractionmapping_method_fields_+', through='core.ObjectiveProperty', to='core.MethodExtractionField'),
        ),
    ]

# Generated by Django 3.2.4 on 2021-08-23 07:08

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('core', '0018_extructresource'),
    ]

    operations = [
        migrations.CreateModel(
            name='ExtractionMapping',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='develop', max_length=100)),
                ('repository', models.CharField(choices=[('edurep.EdurepOAIPMH', 'Edurep'), ('sharekit.SharekitMetadataHarvest', 'Sharekit')], max_length=50)),
                ('root', models.CharField(default='$', max_length=256)),
                ('is_active', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='ExtractionMethod',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('method', models.CharField(max_length=256)),
                ('processor', models.CharField(max_length=256)),
            ],
        ),
        migrations.CreateModel(
            name='JSONExtractionField',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('path', models.CharField(max_length=256)),
            ],
        ),
        migrations.CreateModel(
            name='MethodExtractionField',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('method', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.extractionmethod')),
            ],
        ),
        migrations.CreateModel(
            name='ObjectiveProperty',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('property', models.CharField(choices=[('publisher_date', 'publisher_date'), ('material_types', 'material_types'), ('copyright_description', 'copyright_description'), ('technical_type', 'technical_type'), ('has_parts', 'has_parts'), ('keywords', 'keywords'), ('disciplines', 'disciplines'), ('aggregation_level', 'aggregation_level'), ('publishers', 'publishers'), ('description', 'description'), ('lowest_educational_level', 'lowest_educational_level'), ('authors', 'authors'), ('parties', 'parties'), ('title', 'title'), ('from_youtube', 'from_youtube'), ('is_restricted', 'is_restricted'), ('language', 'language'), ('analysis_allowed', 'analysis_allowed'), ('ideas', 'ideas'), ('research_themes', 'research_themes'), ('is_part_of', 'is_part_of'), ('research_object_type', 'research_object_type'), ('mime_type', 'mime_type'), ('url', 'url'), ('copyright', 'copyright'), ('doi', 'doi'), ('files', 'files'), ('lom_educational_levels', 'lom_educational_levels')], max_length=50)),
                ('is_context', models.BooleanField(default=False)),
                ('json_field', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='core.jsonextractionfield')),
                ('mapping', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.extractionmapping')),
                ('method_field', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='core.methodextractionfield')),
            ],
            options={
                'verbose_name_plural': 'objective properties',
            },
        ),
        migrations.AddField(
            model_name='extractionmapping',
            name='json_fields',
            field=models.ManyToManyField(related_name='_core_extractionmapping_json_fields_+', through='core.ObjectiveProperty', to='core.JSONExtractionField'),
        ),
        migrations.AddField(
            model_name='extractionmapping',
            name='method_fields',
            field=models.ManyToManyField(related_name='_core_extractionmapping_method_fields_+', through='core.ObjectiveProperty', to='core.MethodExtractionField'),
        ),
    ]

# Generated by Django 3.2.4 on 2021-08-23 07:08