aboutsummaryrefslogtreecommitdiffstats
path: root/alphabetlearning/resources/migrations/0001_initial.py
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-10-15 21:01:31 +0100
committerMatthew Lemon <y@yulqen.org>2024-10-15 21:01:31 +0100
commiteeaddb27560d723ca7d61359744ceb2709fccd2d (patch)
tree04ddbc49ae7b73d5f5a9e1716d7227aecd3b9f85 /alphabetlearning/resources/migrations/0001_initial.py
parent7a3044c859043837e6c7c95bb4894d04e9b2cbc2 (diff)
Renamed from pyblackbird_cc to alphabetlearning - everywhere
Diffstat (limited to 'alphabetlearning/resources/migrations/0001_initial.py')
-rw-r--r--alphabetlearning/resources/migrations/0001_initial.py90
1 files changed, 90 insertions, 0 deletions
diff --git a/alphabetlearning/resources/migrations/0001_initial.py b/alphabetlearning/resources/migrations/0001_initial.py
new file mode 100644
index 0000000..812c98f
--- /dev/null
+++ b/alphabetlearning/resources/migrations/0001_initial.py
@@ -0,0 +1,90 @@
+# 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')},
+ ),
+ ]