From 9bb6de1a7f3399242ef92a94b8c80c1574add01f Mon Sep 17 00:00:00 2001 From: Anne Haley Date: Sat, 6 Nov 2021 11:33:23 -0400 Subject: [PATCH] Manually edit migration file --- miqa/core/migrations/0018_image_to_frame.py | 54 +++++---------------- 1 file changed, 12 insertions(+), 42 deletions(-) diff --git a/miqa/core/migrations/0018_image_to_frame.py b/miqa/core/migrations/0018_image_to_frame.py index 24c0f209..a75895a1 100644 --- a/miqa/core/migrations/0018_image_to_frame.py +++ b/miqa/core/migrations/0018_image_to_frame.py @@ -1,9 +1,6 @@ # Generated by Django 3.2.8 on 2021-11-05 19:29 -import uuid - from django.db import migrations, models import django.db.models.deletion -import django_extensions.db.fields class Migration(migrations.Migration): @@ -13,49 +10,11 @@ class Migration(migrations.Migration): ] operations = [ - migrations.CreateModel( - name='Frame', - fields=[ - ( - 'created', - django_extensions.db.fields.CreationDateTimeField( - auto_now_add=True, verbose_name='created' - ), - ), - ( - 'modified', - django_extensions.db.fields.ModificationDateTimeField( - auto_now=True, verbose_name='modified' - ), - ), - ( - 'id', - models.UUIDField( - default=uuid.uuid4, editable=False, primary_key=True, serialize=False - ), - ), - ('raw_path', models.CharField(max_length=500, unique=True)), - ('frame_number', models.IntegerField(default=0)), - ( - 'scan', - models.ForeignKey( - on_delete=django.db.models.deletion.CASCADE, - related_name='frames', - to='core.scan', - ), - ), - ], - options={ - 'ordering': ['scan', 'frame_number'], - }, - ), migrations.RemoveField( model_name='evaluation', name='image', ), - migrations.DeleteModel( - name='Image', - ), + migrations.RenameModel('Image', 'Frame'), migrations.AddField( model_name='evaluation', name='frame', @@ -70,4 +29,15 @@ class Migration(migrations.Migration): fields=['scan', 'frame_number'], name='core_frame_scan_id_ea9adc_idx' ), ), + migrations.RemoveIndex( + model_name='frame', + name='core_image_scan_id_26e3ff_idx', + ), + migrations.AlterField( + model_name='frame', + name='scan', + field=models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, related_name='frames', to='core.scan' + ), + ), ]