Alembic not registering migrations #1390
Replies: 1 comment
-
found issue in other discussion |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First Check
Commit to Help
Example Code
Description
I add a new field to the user model, in this case test_bool. I then run a migration:
docker compose exec backend bash
bash: docker: command not found
root@997dca991e8c:/app# alembic revision --autogenerate -m "add test"
/app/app/core/config.py:107: UserWarning: The value of SECRET_KEY is "changethis", for security, please change it, at least for deployments.
warnings.warn(message, stacklevel=1)
/app/app/core/config.py:107: UserWarning: The value of POSTGRES_PASSWORD is "changethis", for security, please change it, at least for deployments.
warnings.warn(message, stacklevel=1)
/app/app/core/config.py:107: UserWarning: The value of FIRST_SUPERUSER_PASSWORD is "changethis", for security, please change it, at least for deployments.
warnings.warn(message, stacklevel=1)
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.autogenerate.compare] Detected added column 'user.test_bool'
Generating /app/app/alembic/versions/c43f1fbc9346_add_test.py ... done
You can see the file gets generated in /app/app/alembic/versions/ and I can inspect this file in docker. It does not however get saved to the backend app/alembic/versions directory. This causes all sorts of problems when restarting that force me to re-create my images and redo the migrations.
Operating System
macOS
Operating System Details
I have M1
Python Version
3.9.6
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions