mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-10 07:43:10 -05:00
[PR #3327] [MERGED] BREAKING CHANGE/sqlalchemy instead of peewee #8017
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/3327
Author: @jonathan-rohde
Created: 6/20/2024
Status: ✅ Merged
Merged: 7/2/2024
Merged by: @tjbck
Base:
dev-migration← Head:feat/sqlalchemy-instead-of-peewee📝 Commits (10+)
df09d08feat(sqlalchemy): Replace peewee with sqlalchemybee835cfeat(sqlalchemy): remove session reference from router070d908feat(sqlalchemy): use subprocess to do migrations320e658feat(sqlalchemy): cleanup fixesc134eabfeat(sqlalchemy): format backendeb01e8dfeat(sqlalchemy): use scoped sessionda403f3feat(sqlalchemy): use session factory instead of context managera9b1487feat(sqlalchemy): fix wrong column types8f939cffeat(sqlalchemy): some fixes2fb27adfeat(sqlalchemy): add missing file📊 Changes
60 files changed (+2219 additions, -2109 deletions)
View changed files
📝
.github/workflows/integration-test.yml(+24 -2)➕
backend/alembic.ini(+114 -0)📝
backend/apps/webui/internal/db.py(+32 -26)➖
backend/apps/webui/internal/migrations/001_initial_schema.py(+0 -254)➖
backend/apps/webui/internal/migrations/002_add_local_sharing.py(+0 -48)➖
backend/apps/webui/internal/migrations/003_add_auth_api_key.py(+0 -48)➖
backend/apps/webui/internal/migrations/004_add_archived.py(+0 -46)➖
backend/apps/webui/internal/migrations/005_add_updated_at.py(+0 -130)➖
backend/apps/webui/internal/migrations/006_migrate_timestamps_and_charfields.py(+0 -130)➖
backend/apps/webui/internal/migrations/007_add_user_last_active_at.py(+0 -79)➖
backend/apps/webui/internal/migrations/008_add_memory.py(+0 -53)➖
backend/apps/webui/internal/migrations/009_add_models.py(+0 -61)➖
backend/apps/webui/internal/migrations/010_migrate_modelfiles_to_models.py(+0 -130)➖
backend/apps/webui/internal/migrations/011_add_user_settings.py(+0 -48)➖
backend/apps/webui/internal/migrations/012_add_tools.py(+0 -61)➖
backend/apps/webui/internal/migrations/013_add_user_info.py(+0 -48)➖
backend/apps/webui/internal/migrations/014_add_files.py(+0 -55)➖
backend/apps/webui/internal/migrations/015_add_functions.py(+0 -61)➖
backend/apps/webui/internal/migrations/016_add_valves_and_is_active.py(+0 -50)➖
backend/apps/webui/internal/migrations/017_add_user_oauth_sub.py(+0 -49)...and 40 more files
📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
Replacing peewee with SQLAlchemy. The combination of FastAPI with Peewee is not supported and we should avoid using both libraries in parallel.
The change replaces the whole ORM model with SQLAlchemy and uses Alembic for schema migrations.
The initial database migration script is checking the database schema for table existence and skips table creation in case the table already exists.
Changed
Breaking Change
Additional Information
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.