# Generated by Django 5.2.17 on 2026-08-28 18:56 import django.db.models.deletion import uuid from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='LessonChunk', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('lesson_id', models.IntegerField(db_index=True)), ('grade_id', models.IntegerField(blank=True, null=True)), ('subject', models.CharField(max_length=100)), ('lesson_number', models.IntegerField()), ('chapter', models.IntegerField(blank=True, null=True)), ('order', models.PositiveIntegerField()), ('title', models.CharField(max_length=255)), ('original_text', models.TextField()), ('summary', models.TextField()), ('embedding_vector', models.JSONField(blank=True, null=True)), ('collection', models.CharField(db_index=True, max_length=200)), ('qdrant_point_id', models.UUIDField(default=uuid.uuid4, editable=False)), ('created_at', models.DateTimeField(auto_now_add=True)), ], options={ 'ordering': ['lesson_id', 'order'], 'indexes': [models.Index(fields=['subject', 'lesson_number'], name='rag_lessonc_subject_73ff32_idx')], 'constraints': [models.UniqueConstraint(fields=('collection', 'qdrant_point_id'), name='uniq_lesson_chunk_qdrant_point')], }, ), migrations.CreateModel( name='LessonChunkImage', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('img_url', models.TextField()), ('description', models.TextField(blank=True)), ('created_at', models.DateTimeField(auto_now_add=True)), ('chunk', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='images', to='rag.lessonchunk')), ], ), ]