# Generated by Django 4.2.3 on 2023-10-28 23:18

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


class Migration(migrations.Migration):

    replaces = [('ocr_translate', '0010_rename_from_ocr_bbox_from_ocr_merged'), ('ocr_translate', '0011_bbox_from_ocr_single_alter_bbox_from_ocr_merged'), ('ocr_translate', '0012_ocrmodel_ocr_mode'), ('ocr_translate', '0013_rename_result_ocrrun_result_merged'), ('ocr_translate', '0014_ocrrun_result_single_alter_ocrrun_result_merged'), ('ocr_translate', '0015_bbox_to_merged'), ('ocr_translate', '0016_alter_ocrrun_result_merged')]

    dependencies = [
        ('ocr_translate', '0009_remove_language_easyocr_remove_language_facebookm2m_and_more'),
    ]

    operations = [
        migrations.RenameField(
            model_name='bbox',
            old_name='from_ocr',
            new_name='from_ocr_merged',
        ),
        migrations.AddField(
            model_name='bbox',
            name='from_ocr_single',
            field=models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='result_single', to='ocr_translate.ocrboxrun'),
        ),
        migrations.AlterField(
            model_name='bbox',
            name='from_ocr_merged',
            field=models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='result_merged', to='ocr_translate.ocrboxrun'),
        ),
        migrations.AddField(
            model_name='ocrmodel',
            name='ocr_mode',
            field=models.CharField(choices=[('single', 'Single'), ('merged', 'Merged')], default='merged', max_length=32),
        ),
        migrations.RenameField(
            model_name='ocrrun',
            old_name='result',
            new_name='result_merged',
        ),
        migrations.AddField(
            model_name='ocrrun',
            name='result_single',
            field=models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='from_ocr_single', to='ocr_translate.text'),
        ),
        migrations.AlterField(
            model_name='ocrrun',
            name='result_merged',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='from_ocr_merged', to='ocr_translate.text'),
        ),
        migrations.AddField(
            model_name='bbox',
            name='to_merged',
            field=models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='from_single', to='ocr_translate.bbox'),
        ),
        migrations.AlterField(
            model_name='ocrrun',
            name='result_merged',
            field=models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='from_ocr_merged', to='ocr_translate.text'),
        ),
    ]
