[PR #3595] [MERGED] feat: db migration #8089

Closed
opened 2025-11-11 17:44:41 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/3595
Author: @tjbck
Created: 7/2/2024
Status: Merged
Merged: 7/6/2024
Merged by: @tjbck

Base: devHead: dev-migration


📝 Commits (10+)

  • df09d08 feat(sqlalchemy): Replace peewee with sqlalchemy
  • bee835c feat(sqlalchemy): remove session reference from router
  • 070d908 feat(sqlalchemy): use subprocess to do migrations
  • 320e658 feat(sqlalchemy): cleanup fixes
  • c134eab feat(sqlalchemy): format backend
  • eb01e8d feat(sqlalchemy): use scoped session
  • da403f3 feat(sqlalchemy): use session factory instead of context manager
  • a9b1487 feat(sqlalchemy): fix wrong column types
  • 8f939cf feat(sqlalchemy): some fixes
  • 2fb27ad feat(sqlalchemy): add missing file

📊 Changes

44 files changed (+2720 additions, -957 deletions)

View changed files

📝 .github/workflows/integration-test.yml (+24 -2)
backend/alembic.ini (+114 -0)
📝 backend/apps/webui/internal/db.py (+77 -24)
📝 backend/apps/webui/internal/migrations/017_add_user_oauth_sub.py (+0 -4)
backend/apps/webui/internal/migrations/README.md (+0 -21)
📝 backend/apps/webui/main.py (+1 -1)
📝 backend/apps/webui/models/auths.py (+60 -54)
📝 backend/apps/webui/models/chats.py (+199 -186)
📝 backend/apps/webui/models/documents.py (+68 -62)
📝 backend/apps/webui/models/files.py (+60 -50)
📝 backend/apps/webui/models/functions.py (+122 -104)
📝 backend/apps/webui/models/memories.py (+86 -76)
📝 backend/apps/webui/models/models.py (+46 -41)
📝 backend/apps/webui/models/prompts.py (+45 -46)
📝 backend/apps/webui/models/tags.py (+139 -106)
📝 backend/apps/webui/models/tools.py (+69 -63)
📝 backend/apps/webui/models/users.py (+117 -94)
📝 backend/apps/webui/routers/chats.py (+5 -2)
📝 backend/apps/webui/routers/documents.py (+3 -1)
📝 backend/apps/webui/routers/files.py (+1 -4)

...and 24 more files

📄 Description

Extension of #3327


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/3595 **Author:** [@tjbck](https://github.com/tjbck) **Created:** 7/2/2024 **Status:** ✅ Merged **Merged:** 7/6/2024 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `dev-migration` --- ### 📝 Commits (10+) - [`df09d08`](https://github.com/open-webui/open-webui/commit/df09d0830a1680a1028a5df0864d916d6b66d302) feat(sqlalchemy): Replace peewee with sqlalchemy - [`bee835c`](https://github.com/open-webui/open-webui/commit/bee835cb65a8b3feba6824d2e6c9378b95f6e990) feat(sqlalchemy): remove session reference from router - [`070d908`](https://github.com/open-webui/open-webui/commit/070d9083d5dd515c32bd7bf60aeecc56f5bc059c) feat(sqlalchemy): use subprocess to do migrations - [`320e658`](https://github.com/open-webui/open-webui/commit/320e658595918241c9bdab4f302017039d1ae694) feat(sqlalchemy): cleanup fixes - [`c134eab`](https://github.com/open-webui/open-webui/commit/c134eab27a929cbf678a60356a4c8f6c2e718201) feat(sqlalchemy): format backend - [`eb01e8d`](https://github.com/open-webui/open-webui/commit/eb01e8d2755a73f7c8db121d7b69b36bee1cae22) feat(sqlalchemy): use scoped session - [`da403f3`](https://github.com/open-webui/open-webui/commit/da403f3e3cf9ce700da2fdb477e0bdfc4794d37d) feat(sqlalchemy): use session factory instead of context manager - [`a9b1487`](https://github.com/open-webui/open-webui/commit/a9b148791d982b9635935a41ca6bdc3aa47165c3) feat(sqlalchemy): fix wrong column types - [`8f939cf`](https://github.com/open-webui/open-webui/commit/8f939cf55bc4a4de63c859f033cf5da5378e2d30) feat(sqlalchemy): some fixes - [`2fb27ad`](https://github.com/open-webui/open-webui/commit/2fb27adbf67c13d89ac652f3652f7a578a3bcb25) feat(sqlalchemy): add missing file ### 📊 Changes **44 files changed** (+2720 additions, -957 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/integration-test.yml` (+24 -2) ➕ `backend/alembic.ini` (+114 -0) 📝 `backend/apps/webui/internal/db.py` (+77 -24) 📝 `backend/apps/webui/internal/migrations/017_add_user_oauth_sub.py` (+0 -4) ➖ `backend/apps/webui/internal/migrations/README.md` (+0 -21) 📝 `backend/apps/webui/main.py` (+1 -1) 📝 `backend/apps/webui/models/auths.py` (+60 -54) 📝 `backend/apps/webui/models/chats.py` (+199 -186) 📝 `backend/apps/webui/models/documents.py` (+68 -62) 📝 `backend/apps/webui/models/files.py` (+60 -50) 📝 `backend/apps/webui/models/functions.py` (+122 -104) 📝 `backend/apps/webui/models/memories.py` (+86 -76) 📝 `backend/apps/webui/models/models.py` (+46 -41) 📝 `backend/apps/webui/models/prompts.py` (+45 -46) 📝 `backend/apps/webui/models/tags.py` (+139 -106) 📝 `backend/apps/webui/models/tools.py` (+69 -63) 📝 `backend/apps/webui/models/users.py` (+117 -94) 📝 `backend/apps/webui/routers/chats.py` (+5 -2) 📝 `backend/apps/webui/routers/documents.py` (+3 -1) 📝 `backend/apps/webui/routers/files.py` (+1 -4) _...and 24 more files_ </details> ### 📄 Description Extension of #3327 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-11 17:44:41 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#8089