# Generated by Django 5.0.4 on 2024-05-13 21:41 import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='PDFResource', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('file_name', models.CharField(max_length=255)), ('file_size', models.IntegerField()), ], ), migrations.CreateModel( name='Resource', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=255)), ('thumbnail_filenames', models.JSONField(default=list, verbose_name='Thumbnail filenames')), ('description', models.TextField(max_length=1000)), ('age_range', models.CharField(choices=[('3-5', '3-5'), ('5-7', '5-7'), ('7-11', '7-11'), ('11-14', '11-14'), ('14-16', '14-16'), ('16+', '16+'), ('Age not applicable', 'Age not applicable')], default='5-7', max_length=20)), ('curriculum', models.CharField(blank=True, choices=[('No curriculum', 'No curriculum'), ('English', 'English'), ('Scottish', 'Scottish')], default='English', max_length=20, null=True)), ('created_at', models.DateTimeField(auto_now_add=True)), ('updated_at', models.DateTimeField(auto_now=True)), ], ), migrations.CreateModel( name='ResourceCategory', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=255)), ('created_at', models.DateTimeField(auto_now_add=True)), ('updated_at', models.DateTimeField(auto_now=True)), ], options={ 'verbose_name_plural': 'Resource Categories', }, ), migrations.CreateModel( name='ResourceType', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=255)), ('created_at', models.DateTimeField(auto_now_add=True)), ('updated_at', models.DateTimeField(auto_now=True)), ], ), migrations.CreateModel( name='PDFPageSnapshot', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=255)), ('file_name', models.CharField(max_length=255)), ('pdf_file', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pdf_page_snapshots', to='resources.pdfresource')), ], ), migrations.AddField( model_name='pdfresource', name='resource', field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pdf_resources', to='resources.resource'), ), migrations.AddField( model_name='resource', name='additional_resource_category', field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='additional_resource_category', to='resources.resourcecategory'), ), migrations.AddField( model_name='resource', name='main_resource_category', field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='main_resource_category', to='resources.resourcecategory'), ), migrations.AddField( model_name='resource', name='resource_type', field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='resources.resourcetype'), ), migrations.AlterUniqueTogether( name='pdfresource', unique_together={('resource', 'file_name')}, ), ]