jazzband / django-fsm-log

Automatic logging for Django FSM
https://django-fsm-log.readthedocs.io/en/latest/
MIT License
242 stars 79 forks source link

'django_fsm_log' have changes that are not yet reflected in a migration, and so won't be applied #182

Closed John-Doherty01 closed 5 months ago

John-Doherty01 commented 1 year ago

Constantly getting a message about an unapplied migration see below, not sure if set something wrong up. I run migrate and no migrations are applied.

Operations to perform:
 Apply all migrations: admin, auth, contenttypes, django_celery_beat, django_fsm_log, rest_api, sessions
Running migrations:
No migrations to apply.
 Your models in app(s): 'django_fsm_log' have changes that are not yet reflected in a migration, and so won't be applied.
 Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.

 160 static files copied to '/usr/src/app/django/staticfiles'.
Watching for file changes with StatReloader
Watching for file changes with StatReloader
 Performing system checks...

 System check identified no issues (0 silenced).
 June 10, 2023 - 18:20:12
 Django version 4.2.2, using settings 'django_project.settings'
 Starting ASGI/Channels version 3.0.5 development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.

python = "^3.11" Django = "^4.2.2" django-fsm = "^2.8.1" django-fsm-log = "^3.1.0"


INSTALLED_APPS = [
    "django.contrib.admin",
    "django.contrib.auth",
    "django.contrib.contenttypes",
    "django.contrib.sessions",
    "django.contrib.messages",
    "django.contrib.staticfiles",
    "django_fsm",
    "django_fsm_log",
    ...
]
root@353cd9925eef:/usr/src/app/django# python manage.py makemigrations
Migrations for 'django_fsm_log':
  /usr/local/lib/python3.11/site-packages/django_fsm_log/migrations/0005_alter_statelog_id.py
    - Alter field id on statelog
root@353cd9925eef:/usr/src/app/django# cat /usr/local/lib/python3.11/site-packages/django_fsm_log/migrations/0005_alter_statelog_id.py
# Generated by Django 4.2.2 on 2023-06-10 18:20

from django.db import migrations, models

class Migration(migrations.Migration):

    dependencies = [
        ("django_fsm_log", "0004_auto_20190131_0341"),
    ]

    operations = [
        migrations.AlterField(
            model_name="statelog",
            name="id",
            field=models.BigAutoField(
                auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
            ),
        ),
    ]
lorenzomorandini commented 5 months ago

Fixed with https://github.com/jazzband/django-fsm-log/pull/184