Fixes migration version numbering

This commit is contained in:
Mouse Reeve 2021-01-04 21:37:09 -08:00
parent a73f51ad78
commit ff9caf3d51
2 changed files with 14 additions and 26 deletions

View file

@ -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',),
),
]

View file

@ -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.fields.reverse_related import ManyToOneRel
from django.db.models import Q 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): def convert_review_rating(app_registry, schema_editor):
''' take reviews with no content and turn them into ratings ''' ''' 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): class Migration(migrations.Migration):
dependencies = [ dependencies = [
('bookwyrm', '0030_reviewrating'), ('bookwyrm', '0032_auto_20210104_2055'),
] ]
operations = [ 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), migrations.RunPython(convert_review_rating),
] ]