You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Operating System: [WSL Windows 11, Docker Desktop]
Confirmation:
I have read and followed all the instructions provided in the README.md.
I am on the latest version of both Open WebUI and Ollama.
I have included the browser console logs.
I have included the Docker container logs.
I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.
Expected Behavior:
When I run alembic revision --autogenerate -m "verify no migrate is needed"
it should say the the db is up to date
Actual Behavior:
It creates a weird migration and dropping many tables
Description
Bug Summary:
The alembic setup is not up to date with the db state.
imo the current setup is assuming that the db is constructed in 2 steps
peewee-migrate
alembic
However when one add a new model everything breaks
Reproduction Details
Steps to Reproduce:
See the docker log below.
run docker run -d -p 3000:8080 -e OPENAI_API_KEY=your_secret_key -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main
and connect to the docker and run the commands bellow:
# cd open_webui
# export PYTHONPATH=.:../
# export WEBUI_SECRET_KEY=your_secret_key
# alembic history
# alembic revision --autogenerate -m "verify no migrate is needed"
alembic revision --autogenerate -m "verify no migrate is needed"
/app/backend/open_webui
/app/backend
/app
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
INFO [alembic.autogenerate.compare] Detected removed table 'channel_member'
INFO [alembic.autogenerate.compare] Detected removed index 'tool_id' on 'tool'
INFO [alembic.autogenerate.compare] Detected removed table 'tool'
INFO [alembic.autogenerate.compare] Detected removed table 'folder'
INFO [alembic.autogenerate.compare] Detected removed index 'memory_id' on 'memory'
INFO [alembic.autogenerate.compare] Detected removed table 'memory'
INFO [alembic.autogenerate.compare] Detected removed table 'message'
INFO [alembic.autogenerate.compare] Detected removed index 'model_id' on 'model'
INFO [alembic.autogenerate.compare] Detected removed table 'model'
INFO [alembic.autogenerate.compare] Detected removed index 'chatidtag_id' on 'chatidtag'
INFO [alembic.autogenerate.compare] Detected removed table 'chatidtag'
INFO [alembic.autogenerate.compare] Detected removed table 'channel'
INFO [alembic.autogenerate.compare] Detected removed index 'prompt_command' on 'prompt'
INFO [alembic.autogenerate.compare] Detected removed table 'prompt'
INFO [alembic.autogenerate.compare] Detected removed index 'function_id' on 'function'
INFO [alembic.autogenerate.compare] Detected removed table 'function'
INFO [alembic.autogenerate.compare] Detected removed table 'config'
INFO [alembic.autogenerate.compare] Detected removed table 'feedback'
INFO [alembic.autogenerate.compare] Detected removed table 'message_reaction'
INFO [alembic.autogenerate.compare] Detected removed table 'knowledge'
INFO [alembic.autogenerate.compare] Detected removed table 'migratehistory'
INFO [alembic.autogenerate.compare] Detected removed index 'document_collection_name' on 'document'
INFO [alembic.autogenerate.compare] Detected removed index 'document_name' on 'document'
INFO [alembic.autogenerate.compare] Detected removed table 'document'
INFO [alembic.autogenerate.compare] Detected NULL on column 'auth.email'
INFO [alembic.autogenerate.compare] Detected NULL on column 'auth.password'
INFO [alembic.autogenerate.compare] Detected NULL on column 'auth.active'
INFO [alembic.autogenerate.compare] Detected type change from INTEGER() to Boolean() on 'auth.active'
INFO [alembic.autogenerate.compare] Detected removed index 'auth_id' on 'auth'
INFO [alembic.autogenerate.compare] Detected NULL on column 'chat.user_id'
INFO [alembic.autogenerate.compare] Detected NULL on column 'chat.title'
INFO [alembic.autogenerate.compare] Detected NULL on column 'chat.created_at'
INFO [alembic.autogenerate.compare] Detected type change from DATETIME() to BigInteger() on 'chat.created_at'
INFO [alembic.autogenerate.compare] Detected NULL on column 'chat.updated_at'
INFO [alembic.autogenerate.compare] Detected type change from DATETIME() to BigInteger() on 'chat.updated_at'
INFO [alembic.autogenerate.compare] Detected type change from VARCHAR(length=255) to Text() on 'chat.share_id'
INFO [alembic.autogenerate.compare] Detected NULL on column 'chat.archived'
INFO [alembic.autogenerate.compare] Detected type change from INTEGER() to Boolean() on 'chat.archived'
INFO [alembic.autogenerate.compare] Detected NULL on column 'chat.meta'
INFO [alembic.autogenerate.compare] Detected removed index 'chat_id' on 'chat'
INFO [alembic.autogenerate.compare] Detected removed index 'chat_share_id' on 'chat'
INFO [alembic.autogenerate.compare] Detected added unique constraint None on '('share_id',)'
INFO [alembic.autogenerate.compare] Detected type change from TEXT() to String() on 'file.id'
INFO [alembic.autogenerate.compare] Detected NULL on column 'file.user_id'
INFO [alembic.autogenerate.compare] Detected type change from TEXT() to String() on 'file.user_id'
INFO [alembic.autogenerate.compare] Detected NULL on column 'file.filename'
INFO [alembic.autogenerate.compare] Detected NULL on column 'file.created_at'
INFO [alembic.autogenerate.compare] Detected type change from INTEGER() to BigInteger() on 'file.created_at'
INFO [alembic.autogenerate.compare] Detected removed index 'file_id' on 'file'
INFO [alembic.autogenerate.compare] Detected NULL on column 'tag.name'
INFO [alembic.autogenerate.compare] Detected NULL on column 'user.name'
INFO [alembic.autogenerate.compare] Detected NULL on column 'user.email'
INFO [alembic.autogenerate.compare] Detected NULL on column 'user.role'
INFO [alembic.autogenerate.compare] Detected NULL on column 'user.profile_image_url'
INFO [alembic.autogenerate.compare] Detected NULL on column 'user.last_active_at'
INFO [alembic.autogenerate.compare] Detected type change from INTEGER() to BigInteger() on 'user.last_active_at'
INFO [alembic.autogenerate.compare] Detected NULL on column 'user.updated_at'
INFO [alembic.autogenerate.compare] Detected type change from INTEGER() to BigInteger() on 'user.updated_at'
INFO [alembic.autogenerate.compare] Detected NULL on column 'user.created_at'
INFO [alembic.autogenerate.compare] Detected type change from INTEGER() to BigInteger() on 'user.created_at'
INFO [alembic.autogenerate.compare] Detected removed index 'user_api_key' on 'user'
INFO [alembic.autogenerate.compare] Detected removed index 'user_id' on 'user'
INFO [alembic.autogenerate.compare] Detected removed index 'user_oauth_sub' on 'user'
INFO [alembic.autogenerate.compare] Detected added unique constraint None on '('api_key',)'
INFO [alembic.autogenerate.compare] Detected added unique constraint None on '('oauth_sub',)'
Generating /app/backend/open_webui/migrations/versions/68d13d238c0f_verify_no_migrate_is_needed.py ... done
This discussion was converted from issue #9853 on February 12, 2025 22:26.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Bug Report
DB Migration is broken
Installation Method
Docker
Environment
Open WebUI Version: [v0.5.10]
Operating System: [WSL Windows 11, Docker Desktop]
Confirmation:
Expected Behavior:
When I run
alembic revision --autogenerate -m "verify no migrate is needed"it should say the the db is up to date
Actual Behavior:
It creates a weird migration and dropping many tables
Description
Bug Summary:
The alembic setup is not up to date with the db state.
imo the current setup is assuming that the db is constructed in 2 steps
However when one add a new model everything breaks
Reproduction Details
Steps to Reproduce:
See the docker log below.
run
docker run -d -p 3000:8080 -e OPENAI_API_KEY=your_secret_key -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:mainand connect to the docker and run the commands bellow:
Logs and Screenshots
Docker Container Logs:
docker run -d -p 3000:8080 -e OPENAI_API_KEY=your_secret_key -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main
This was run within the docker exec after running the command
Additional Information
Related discussion: #9842
Beta Was this translation helpful? Give feedback.
All reactions