0

Recently I renamed a Django model and its parent folder:

from

input_source_type/
    models.py

to

event_source_type/
    models.py

The models.py contains the InputSourceType which is also renamed to EventSourceType.

Another model in (in the system folder) refers to to this model in its migration (0001_initial.py):

class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('admin_input_source_type', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Systm',
            ...

When I run python manage.py makemigrations I got

django.db.migrations.exceptions.NodeNotFoundError: Migration admin_system.0001_initial dependencies reference nonexistent parent node ('admin_input_source_type', '0001_initial')

which is correct as I don't the admin_input_source_type anymore.

I don't want to change the migration manually, what would be the Django way in this scenario?
Thanks!

Viktor
  • 1,325
  • 2
  • 19
  • 41

1 Answers1

0

This link should help, but I would recommend creating a new app to avoid many sensitive issues.

Rifat Rakib
  • 134
  • 7