diff --git a/versions/migrations/0016_drop_existing_reviews.py b/versions/migrations/0016_drop_existing_reviews.py new file mode 100644 index 00000000..fbf86d0b --- /dev/null +++ b/versions/migrations/0016_drop_existing_reviews.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.16 on 2024-12-19 15:20 + +from django.db import migrations + + +def drop_existing_reviews(apps, schema_editor): + Review = apps.get_model("versions", "Review") + output = Review.objects.all().delete() + print(f"\nDeleted {output}...") + + +class Migration(migrations.Migration): + dependencies = [ + ("versions", "0015_drop_review_generated_stub_users"), + ] + operations = [ + migrations.RunPython(drop_existing_reviews, migrations.RunPython.noop), + ] diff --git a/versions/migrations/0016_alter_review_review_manager_alter_review_submitters.py b/versions/migrations/0017_alter_review_review_manager_alter_review_submitters.py similarity index 88% rename from versions/migrations/0016_alter_review_review_manager_alter_review_submitters.py rename to versions/migrations/0017_alter_review_review_manager_alter_review_submitters.py index 2a94ee79..3bf95394 100644 --- a/versions/migrations/0016_alter_review_review_manager_alter_review_submitters.py +++ b/versions/migrations/0017_alter_review_review_manager_alter_review_submitters.py @@ -1,4 +1,4 @@ -# Generated by Django 4.2.16 on 2024-12-18 18:33 +# Generated by Django 4.2.16 on 2024-12-19 15:20 from django.db import migrations, models import django.db.models.deletion @@ -8,7 +8,7 @@ class Migration(migrations.Migration): dependencies = [ ("libraries", "0027_libraryversion_dependencies"), - ("versions", "0015_drop_review_generated_stub_users"), + ("versions", "0016_drop_existing_reviews"), ] operations = [