# Generated by Django 5.2.13 on 2026-05-23 11:12

from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='IngestJob',
            fields=[
                ('id', models.CharField(max_length=64, primary_key=True, serialize=False)),
                ('item_uid', models.CharField(blank=True, db_index=True, max_length=64)),
                ('library_uid', models.CharField(db_index=True, max_length=64)),
                ('celery_task_id', models.CharField(blank=True, max_length=255)),
                ('status', models.CharField(choices=[('pending', 'Pending'), ('processing', 'Processing'), ('completed', 'Completed'), ('failed', 'Failed')], db_index=True, default='pending', max_length=20)),
                ('progress', models.CharField(default='queued', max_length=50)),
                ('error', models.TextField(blank=True, null=True)),
                ('retry_count', models.PositiveIntegerField(default=0)),
                ('chunks_created', models.PositiveIntegerField(default=0)),
                ('concepts_extracted', models.PositiveIntegerField(default=0)),
                ('embedding_model', models.CharField(blank=True, max_length=100)),
                ('content_hash', models.CharField(blank=True, db_index=True, max_length=64)),
                ('source', models.CharField(default='', max_length=100)),
                ('source_ref', models.CharField(blank=True, db_index=True, max_length=200)),
                ('s3_key', models.CharField(max_length=500)),
                ('title', models.CharField(blank=True, max_length=500)),
                ('file_type', models.CharField(blank=True, max_length=100)),
                ('file_size', models.PositiveBigIntegerField(default=0)),
                ('collection_uid', models.CharField(blank=True, max_length=64)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('started_at', models.DateTimeField(blank=True, null=True)),
                ('completed_at', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'ordering': ['-created_at'],
                'indexes': [models.Index(fields=['status', '-created_at'], name='library_ing_status_9c95b2_idx'), models.Index(fields=['source', 'source_ref'], name='library_ing_source_a48684_idx')],
            },
        ),
    ]
