diff options
Diffstat (limited to 'alphabetlearning/resources/migrations')
20 files changed, 492 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')}, + ), + ] diff --git a/alphabetlearning/resources/migrations/0002_alter_resource_additional_resource_category_and_more.py b/alphabetlearning/resources/migrations/0002_alter_resource_additional_resource_category_and_more.py new file mode 100644 index 0000000..3b70450 --- /dev/null +++ b/alphabetlearning/resources/migrations/0002_alter_resource_additional_resource_category_and_more.py @@ -0,0 +1,24 @@ +# Generated by Django 5.0.4 on 2024-05-15 20:00 + +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('resources', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='resource', + name='additional_resource_category', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='additional_resource_category', to='resources.resourcecategory'), + ), + migrations.AlterField( + model_name='resource', + name='curriculum', + field=models.CharField(blank=True, choices=[('No curriculum', 'No curriculum'), ('English', 'English'), ('Scottish', 'Scottish')], default='English', max_length=20), + ), + ] diff --git a/alphabetlearning/resources/migrations/0003_alter_resource_description.py b/alphabetlearning/resources/migrations/0003_alter_resource_description.py new file mode 100644 index 0000000..f0ed99c --- /dev/null +++ b/alphabetlearning/resources/migrations/0003_alter_resource_description.py @@ -0,0 +1,18 @@ +# Generated by Django 5.0.4 on 2024-05-16 11:33 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('resources', '0002_alter_resource_additional_resource_category_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='resource', + name='description', + field=models.TextField(help_text='\n <strong>Markdown acceptable here!</strong>This is your opportunity to clearly explain what\n your resource is all about! It’s worth remembering that you are using the space to\n communicate to two different audiences. Firstly, think about what fellow teachers\n would like to know, such as exactly what the resource contains and how it could be used in\n the classroom. Secondly, the words you include on this page are also talking to internal and\n external search engines. External search engines, like Google, show the first 155 characters\n of the resource description, so make sure you take advantage\n of these characters by using lots of relevant keywords as part of an enticing pitch.\n', max_length=5000), + ), + ] diff --git a/alphabetlearning/resources/migrations/0004_resource_feature_slot_1_resource_feature_slot_2_and_more.py b/alphabetlearning/resources/migrations/0004_resource_feature_slot_1_resource_feature_slot_2_and_more.py new file mode 100644 index 0000000..d595b62 --- /dev/null +++ b/alphabetlearning/resources/migrations/0004_resource_feature_slot_1_resource_feature_slot_2_and_more.py @@ -0,0 +1,28 @@ +# Generated by Django 5.0.4 on 2024-05-22 19:24 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('resources', '0003_alter_resource_description'), + ] + + operations = [ + migrations.AddField( + model_name='resource', + name='feature_slot_1', + field=models.IntegerField(choices=[(1, 1), (2, 2), (3, 3)], null=True, unique=True), + ), + migrations.AddField( + model_name='resource', + name='feature_slot_2', + field=models.IntegerField(choices=[(1, 1), (2, 2), (3, 3)], null=True, unique=True), + ), + migrations.AddField( + model_name='resource', + name='feature_slot_3', + field=models.IntegerField(choices=[(1, 1), (2, 2), (3, 3)], null=True, unique=True), + ), + ] diff --git a/alphabetlearning/resources/migrations/0005_rename_feature_slot_1_resource_feature_slot_and_more.py b/alphabetlearning/resources/migrations/0005_rename_feature_slot_1_resource_feature_slot_and_more.py new file mode 100644 index 0000000..2937c50 --- /dev/null +++ b/alphabetlearning/resources/migrations/0005_rename_feature_slot_1_resource_feature_slot_and_more.py @@ -0,0 +1,26 @@ +# Generated by Django 5.0.4 on 2024-05-22 19:26 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('resources', '0004_resource_feature_slot_1_resource_feature_slot_2_and_more'), + ] + + operations = [ + migrations.RenameField( + model_name='resource', + old_name='feature_slot_1', + new_name='feature_slot', + ), + migrations.RemoveField( + model_name='resource', + name='feature_slot_2', + ), + migrations.RemoveField( + model_name='resource', + name='feature_slot_3', + ), + ] diff --git a/alphabetlearning/resources/migrations/0006_resource_card_description_and_more.py b/alphabetlearning/resources/migrations/0006_resource_card_description_and_more.py new file mode 100644 index 0000000..d343e76 --- /dev/null +++ b/alphabetlearning/resources/migrations/0006_resource_card_description_and_more.py @@ -0,0 +1,23 @@ +# Generated by Django 5.0.4 on 2024-05-26 15:09 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('resources', '0005_rename_feature_slot_1_resource_feature_slot_and_more'), + ] + + operations = [ + migrations.AddField( + model_name='resource', + name='card_description', + field=models.TextField(blank=True, help_text="If you enter text here, it will be used in the 'card' description box on the home page. Max 1000 characters.", max_length=1000, null=True), + ), + migrations.AlterField( + model_name='resource', + name='feature_slot', + field=models.IntegerField(blank=True, choices=[(1, 1), (2, 2), (3, 3)], null=True, unique=True), + ), + ] diff --git a/alphabetlearning/resources/migrations/0007_alter_resource_feature_slot.py b/alphabetlearning/resources/migrations/0007_alter_resource_feature_slot.py new file mode 100644 index 0000000..c5c17c7 --- /dev/null +++ b/alphabetlearning/resources/migrations/0007_alter_resource_feature_slot.py @@ -0,0 +1,18 @@ +# Generated by Django 5.0.4 on 2024-05-26 15:23 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('resources', '0006_resource_card_description_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='resource', + name='feature_slot', + field=models.IntegerField(blank=True, choices=[(0, 0), (1, 1), (2, 2), (3, 3)], default=0, null=True, unique=True), + ), + ] diff --git a/alphabetlearning/resources/migrations/0008_alter_resource_card_description.py b/alphabetlearning/resources/migrations/0008_alter_resource_card_description.py new file mode 100644 index 0000000..18e5739 --- /dev/null +++ b/alphabetlearning/resources/migrations/0008_alter_resource_card_description.py @@ -0,0 +1,18 @@ +# Generated by Django 5.0.4 on 2024-05-26 15:42 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('resources', '0007_alter_resource_feature_slot'), + ] + + operations = [ + migrations.AlterField( + model_name='resource', + name='card_description', + field=models.TextField(blank=True, default='', help_text="If you enter text here, it will be used in the 'card' description box on the home page. Max 1000 characters.", max_length=1000), + ), + ] diff --git a/alphabetlearning/resources/migrations/0009_alter_resource_feature_slot.py b/alphabetlearning/resources/migrations/0009_alter_resource_feature_slot.py new file mode 100644 index 0000000..ca082d4 --- /dev/null +++ b/alphabetlearning/resources/migrations/0009_alter_resource_feature_slot.py @@ -0,0 +1,18 @@ +# Generated by Django 5.0.4 on 2024-05-26 18:17 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('resources', '0008_alter_resource_card_description'), + ] + + operations = [ + migrations.AlterField( + model_name='resource', + name='feature_slot', + field=models.IntegerField(blank=True, choices=[(1, 1), (2, 2), (3, 3)], default=0, null=True, unique=True), + ), + ] diff --git a/alphabetlearning/resources/migrations/0010_alter_resource_age_range.py b/alphabetlearning/resources/migrations/0010_alter_resource_age_range.py new file mode 100644 index 0000000..49c7a2c --- /dev/null +++ b/alphabetlearning/resources/migrations/0010_alter_resource_age_range.py @@ -0,0 +1,18 @@ +# Generated by Django 5.0.4 on 2024-07-11 14:47 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('resources', '0009_alter_resource_feature_slot'), + ] + + operations = [ + migrations.AlterField( + model_name='resource', + name='age_range', + field=models.CharField(choices=[('Preschool (3-4yrs)', 'Preschool (3-4yrs)'), ('Nursery (2-5yrs)', 'Nursery (2-5yrs)'), ('Reception (4-5yrs)', 'Reception (4-5yrs)'), ('Year 1 (5-6yrs)', 'Year 1 (5-6yrs)'), ('Year 2 (6-7yrs)', 'Year 2 (6-7yrs)'), ('Early Years (0-5yrs)', 'Early Years (0-5yrs)'), ('Keystage 1 (5-7yrs)', 'Keystage 1 (5-7yrs)'), ('Keystage 2 (7-11yrs)', 'Keystage 2 (7-11yrs)'), ('Age not applicable', 'Age not applicable')], default='5-7', max_length=20), + ), + ] diff --git a/alphabetlearning/resources/migrations/0011_alter_resource_curriculum.py b/alphabetlearning/resources/migrations/0011_alter_resource_curriculum.py new file mode 100644 index 0000000..5e1b193 --- /dev/null +++ b/alphabetlearning/resources/migrations/0011_alter_resource_curriculum.py @@ -0,0 +1,18 @@ +# Generated by Django 5.0.4 on 2024-07-11 14:50 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('resources', '0010_alter_resource_age_range'), + ] + + operations = [ + migrations.AlterField( + model_name='resource', + name='curriculum', + field=models.CharField(blank=True, choices=[('No curriculum', 'No curriculum'), ('English', 'English'), ('Scottish', 'Scottish')], default='English', max_length=20, null=True), + ), + ] diff --git a/alphabetlearning/resources/migrations/0012_resourcecategory_colour_css_class.py b/alphabetlearning/resources/migrations/0012_resourcecategory_colour_css_class.py new file mode 100644 index 0000000..b48ba61 --- /dev/null +++ b/alphabetlearning/resources/migrations/0012_resourcecategory_colour_css_class.py @@ -0,0 +1,18 @@ +# Generated by Django 5.0.4 on 2024-07-11 15:47 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('resources', '0011_alter_resource_curriculum'), + ] + + operations = [ + migrations.AddField( + model_name='resourcecategory', + name='colour_css_class', + field=models.CharField(blank=True, max_length=56, null=True), + ), + ] diff --git a/alphabetlearning/resources/migrations/0013_resourcecategory_badge_foreground_colour.py b/alphabetlearning/resources/migrations/0013_resourcecategory_badge_foreground_colour.py new file mode 100644 index 0000000..7644a5c --- /dev/null +++ b/alphabetlearning/resources/migrations/0013_resourcecategory_badge_foreground_colour.py @@ -0,0 +1,18 @@ +# Generated by Django 5.0.4 on 2024-07-28 15:12 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("resources", "0012_resourcecategory_colour_css_class"), + ] + + operations = [ + migrations.AddField( + model_name="resourcecategory", + name="badge_foreground_colour", + field=models.CharField(blank=True, max_length=56, null=True), + ), + ] diff --git a/alphabetlearning/resources/migrations/0014_remove_resource_additional_resource_category_and_more.py b/alphabetlearning/resources/migrations/0014_remove_resource_additional_resource_category_and_more.py new file mode 100644 index 0000000..7573bf2 --- /dev/null +++ b/alphabetlearning/resources/migrations/0014_remove_resource_additional_resource_category_and_more.py @@ -0,0 +1,27 @@ +# Generated by Django 5.0.4 on 2024-07-29 14:52 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("resources", "0013_resourcecategory_badge_foreground_colour"), + ] + + operations = [ + migrations.RemoveField( + model_name="resource", + name="additional_resource_category", + ), + migrations.AddField( + model_name="resource", + name="additional_resource_category", + field=models.ManyToManyField( + blank=True, + null=True, + related_name="additional_resource_category", + to="resources.resourcecategory", + ), + ), + ] diff --git a/alphabetlearning/resources/migrations/0015_resourcesubcategory.py b/alphabetlearning/resources/migrations/0015_resourcesubcategory.py new file mode 100644 index 0000000..3eaada4 --- /dev/null +++ b/alphabetlearning/resources/migrations/0015_resourcesubcategory.py @@ -0,0 +1,30 @@ +# Generated by Django 5.0.4 on 2024-07-29 14:55 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("resources", "0014_remove_resource_additional_resource_category_and_more"), + ] + + operations = [ + migrations.CreateModel( + name="ResourceSubcategory", + 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)), + ], + ), + ] diff --git a/alphabetlearning/resources/migrations/0016_alter_resourcesubcategory_options_and_more.py b/alphabetlearning/resources/migrations/0016_alter_resourcesubcategory_options_and_more.py new file mode 100644 index 0000000..77a3f27 --- /dev/null +++ b/alphabetlearning/resources/migrations/0016_alter_resourcesubcategory_options_and_more.py @@ -0,0 +1,31 @@ +# Generated by Django 5.0.4 on 2024-07-29 15:36 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("resources", "0015_resourcesubcategory"), + ] + + operations = [ + migrations.AlterModelOptions( + name="resourcesubcategory", + options={"verbose_name_plural": "Resource Subcategories"}, + ), + migrations.AlterModelOptions( + name="resourcetype", + options={"verbose_name_plural": "Resource Types"}, + ), + migrations.AlterField( + model_name="resource", + name="additional_resource_category", + field=models.ManyToManyField( + blank=True, + null=True, + related_name="additional_resource_category", + to="resources.resourcesubcategory", + ), + ), + ] diff --git a/alphabetlearning/resources/migrations/0017_rename_additional_resource_category_resource_subcategories.py b/alphabetlearning/resources/migrations/0017_rename_additional_resource_category_resource_subcategories.py new file mode 100644 index 0000000..bc4d1e4 --- /dev/null +++ b/alphabetlearning/resources/migrations/0017_rename_additional_resource_category_resource_subcategories.py @@ -0,0 +1,18 @@ +# Generated by Django 5.0.4 on 2024-08-01 14:29 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ("resources", "0016_alter_resourcesubcategory_options_and_more"), + ] + + operations = [ + migrations.RenameField( + model_name="resource", + old_name="additional_resource_category", + new_name="subcategories", + ), + ] diff --git a/alphabetlearning/resources/migrations/0018_alter_resource_subcategories.py b/alphabetlearning/resources/migrations/0018_alter_resource_subcategories.py new file mode 100644 index 0000000..c981512 --- /dev/null +++ b/alphabetlearning/resources/migrations/0018_alter_resource_subcategories.py @@ -0,0 +1,25 @@ +# Generated by Django 5.0.4 on 2024-08-01 15:08 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ( + "resources", + "0017_rename_additional_resource_category_resource_subcategories", + ), + ] + + operations = [ + migrations.AlterField( + model_name="resource", + name="subcategories", + field=models.ManyToManyField( + blank=True, + related_name="additional_resource_category", + to="resources.resourcesubcategory", + ), + ), + ] diff --git a/alphabetlearning/resources/migrations/0019_alter_pdfpagesnapshot_options_and_more.py b/alphabetlearning/resources/migrations/0019_alter_pdfpagesnapshot_options_and_more.py new file mode 100644 index 0000000..511d747 --- /dev/null +++ b/alphabetlearning/resources/migrations/0019_alter_pdfpagesnapshot_options_and_more.py @@ -0,0 +1,26 @@ +# Generated by Django 5.0.4 on 2024-09-03 19:21 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("resources", "0018_alter_resource_subcategories"), + ] + + operations = [ + migrations.AlterModelOptions( + name="pdfpagesnapshot", + options={"verbose_name_plural": "PDF Page Snapshots"}, + ), + migrations.AlterModelOptions( + name="pdfresource", + options={"verbose_name_plural": "PDF Resources"}, + ), + migrations.AddField( + model_name="resource", + name="price", + field=models.DecimalField(decimal_places=2, default=0.0, max_digits=6), + ), + ] diff --git a/alphabetlearning/resources/migrations/__init__.py b/alphabetlearning/resources/migrations/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/alphabetlearning/resources/migrations/__init__.py |