Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsynced migrations warning for django-silk==5.3.2 #772

Open
YevheniiMolodtsov opened this issue Feb 5, 2025 · 0 comments
Open

Unsynced migrations warning for django-silk==5.3.2 #772

YevheniiMolodtsov opened this issue Feb 5, 2025 · 0 comments

Comments

@YevheniiMolodtsov
Copy link

Unsynced migrations warning for django-silk==5.3.2

Description

I’m encountering a warning when running Django management commands. The warning reads:

Your models in app(s): “silk” have changes that are not yet reflected in a migration, and so won’t be applied.

I’m using django-silk==5.3.2 in my project and have not made any custom modifications to the silk package. My expectation is that the package’s shipped migrations are complete and that I should only need to run migrate without having to generate new migrations for the silk app.

Steps to Reproduce

  1. Install django-silk==5.3.2 and add it to your INSTALLED_APPS.
  2. Run any management command that checks for migrations (e.g., python manage.py makemigrations).
  3. Observe the warning about unsynced changes for the silk app.

Expected Behavior

Since I haven’t modified django-silk’s models, I expect the migrations provided by the package to be in sync with the models. I should only need to run migrate without having to generate additional migrations.

Actual Behavior

Django detects that the models in the silk app differ from what is recorded in the migration files and issues the warning. This leads to confusion, as it suggests that there is a pending schema change even though I have not altered any of the package’s code.

Logs

Migrations for ‘silk’:
/usr/local/lib/python3.11/site-packages/silk/migrations/0009_alter_request_prof_file.py
- Alter field prof_file on request

root@19c3280992f7:/src# python manage.py migrate
Operations to perform:
Apply all migrations: account, admin, api, auth, contenttypes, django_celery_beat, influencer, influencer_data_crawler, lists, monitoring, organizations, otp_static, otp_totp, public_api, rest_framework_api_key, sessions, silk, sites, socialaccount, stats, token_blacklist, users, utils
Running migrations:
No migrations to apply.

Environment

  • django-silk: 5.3.2
  • Django: 5.0.6
  • Python: 3.11.11

Additional Context

  • I am using the package in a non-development mode (i.e., not as an editable install).
  • I have verified that I haven’t overridden any migration settings for the silk app in my project.
  • Running makemigrations creates a new migration for the silk app, which I’m reluctant to manage for a third‑party package.

Could you please look into whether this is an issue with the shipped migrations for django-silk or if there’s something else that should be configured to avoid this warning?

Thank you for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant