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

docker-compose migration alerts lack of migration 0003 #503

Open
GuiFV opened this issue Apr 16, 2024 · 2 comments
Open

docker-compose migration alerts lack of migration 0003 #503

GuiFV opened this issue Apr 16, 2024 · 2 comments

Comments

@GuiFV
Copy link

GuiFV commented Apr 16, 2024

When I run docker-compose run web python manage.py migrate I get this message:

Your models in app(s): 'django_summernote' 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.

Running docker-compose run web python manage.py makemigrations alerts that the file was created (0003_alter_attachment_id.py) but migrating again returns the same above message.

PS: on virtual environment everything runs fine with no issues.

@pip-install-python
Copy link

pip-install-python commented Jun 7, 2024

Hey GuiFV,

Ran into the same issue, and it was driving me crazy, finally found the solution from looking through the work of @ethanhann and @alexdeathway.

What I did to fix the issue was pip uninstall django-summernote, then I went into my requirements.txt and replaced django_summernote with git+https://github.com/ethanhann/django-summernote.git@bug/0003_alter_attachment_id_does_not_exists and ran a pip install git+https://github.com/ethanhann/django-summernote.git@bug/0003_alter_attachment_id_does_not_exists just to be sure.

In my docker file I had to make sure I had git installed, which I added after my apt-git / psycopg setup:

# Install apt packages
RUN apt-get update && apt-get install --no-install-recommends -y \
  # dependencies for building Python packages
  build-essential \
  # psycopg dependencies
  libpq-dev \
  # git for pip install
  git

Hope this helps anyone facing the same issues, django-summernote is a great tool for django. Hopeful we can find maintainers

@GuiFV
Copy link
Author

GuiFV commented Jun 7, 2024

Thank you @pip-install-python ! I will check the solution out. Would be great to have these small fixes on the main branch (leaving this for dev/maintenance team)

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

2 participants