From ff9caf3d5118c7f575287af9121fe236a67a7027 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Mon, 4 Jan 2021 21:37:09 -0800 Subject: [PATCH] Fixes migration version numbering --- bookwyrm/migrations/0030_reviewrating.py | 23 ------------------- ...to_20210101_2109.py => 0033_reviewrate.py} | 17 +++++++++++--- 2 files changed, 14 insertions(+), 26 deletions(-) delete mode 100644 bookwyrm/migrations/0030_reviewrating.py rename bookwyrm/migrations/{0031_auto_20210101_2109.py => 0033_reviewrate.py} (80%) diff --git a/bookwyrm/migrations/0030_reviewrating.py b/bookwyrm/migrations/0030_reviewrating.py deleted file mode 100644 index 327c6c6a8..000000000 --- a/bookwyrm/migrations/0030_reviewrating.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 3.0.7 on 2021-01-01 19:05 - -from django.db import migrations, models -import django.db.models.deletion - -class Migration(migrations.Migration): - - dependencies = [ - ('bookwyrm', '0029_auto_20201221_2014'), - ] - - operations = [ - migrations.CreateModel( - name='ReviewRating', - fields=[ - ('review_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='bookwyrm.Review')), - ], - options={ - 'abstract': False, - }, - bases=('bookwyrm.review',), - ), - ] diff --git a/bookwyrm/migrations/0031_auto_20210101_2109.py b/bookwyrm/migrations/0033_reviewrate.py similarity index 80% rename from bookwyrm/migrations/0031_auto_20210101_2109.py rename to bookwyrm/migrations/0033_reviewrate.py index 8343719f7..69c0ec578 100644 --- a/bookwyrm/migrations/0031_auto_20210101_2109.py +++ b/bookwyrm/migrations/0033_reviewrate.py @@ -1,8 +1,9 @@ -# Generated by Django 3.0.7 on 2021-01-01 21:09 +# Generated by Django 3.0.7 on 2021-01-05 05:32 from django.db.models.fields.reverse_related import ManyToOneRel from django.db.models import Q -from django.db import migrations +from django.db import migrations, models +import django.db.models.deletion def convert_review_rating(app_registry, schema_editor): ''' take reviews with no content and turn them into ratings ''' @@ -53,9 +54,19 @@ def convert_review_rating(app_registry, schema_editor): class Migration(migrations.Migration): dependencies = [ - ('bookwyrm', '0030_reviewrating'), + ('bookwyrm', '0032_auto_20210104_2055'), ] operations = [ + migrations.CreateModel( + name='ReviewRating', + fields=[ + ('review_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='bookwyrm.Review')), + ], + options={ + 'abstract': False, + }, + bases=('bookwyrm.review',), + ), migrations.RunPython(convert_review_rating), ]