[PR #136] [MERGED] support to use mysql as plugin db #329

Closed
opened 2026-02-16 01:15:34 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugin-daemon/pull/136
Author: @whhe
Created: 3/23/2025
Status: Merged
Merged: 3/28/2025
Merged by: @Yeuoly

Base: mainHead: mysql-compatible


📝 Commits (2)

  • d4aefed support to use mysql as plugin db
  • 19c1009 test plugin server with mysql

📊 Changes

14 files changed (+324 additions, -111 deletions)

View changed files

📝 .github/workflows/tests.yml (+13 -0)
📝 go.mod (+2 -0)
📝 go.sum (+5 -0)
📝 internal/core/persistence/persistence_test.go (+3 -0)
📝 internal/core/plugin_manager/debugging_runtime/server_test.go (+55 -29)
📝 internal/db/executor.go (+0 -0)
📝 internal/db/executor_test.go (+4 -2)
📝 internal/db/init.go (+26 -79)
internal/db/mysql/dialector.go (+45 -0)
internal/db/mysql/mysql.go (+82 -0)
internal/db/pg/pg.go (+73 -0)
📝 internal/types/app/config.go (+1 -0)
📝 internal/types/app/default.go (+5 -1)
📝 internal/types/models/base.go (+10 -0)

📄 Description

In this PR, I added a new module internal/db/mysql, which implements the initDifyPluginDB of MySQL. Models definitions that are incompatible with MySQL (such as uuid types and text fields) are rewritten through custom dialector and migrator. These changes will not affect the original postgresql process. PTAL @Yeuoly


🔄 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/langgenius/dify-plugin-daemon/pull/136 **Author:** [@whhe](https://github.com/whhe) **Created:** 3/23/2025 **Status:** ✅ Merged **Merged:** 3/28/2025 **Merged by:** [@Yeuoly](https://github.com/Yeuoly) **Base:** `main` ← **Head:** `mysql-compatible` --- ### 📝 Commits (2) - [`d4aefed`](https://github.com/langgenius/dify-plugin-daemon/commit/d4aefed92cca4f20d4ac94ac331c1fb29e3dd6a3) support to use mysql as plugin db - [`19c1009`](https://github.com/langgenius/dify-plugin-daemon/commit/19c1009fb475fd56d9aa3b4117529cb6e1747bd9) test plugin server with mysql ### 📊 Changes **14 files changed** (+324 additions, -111 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/tests.yml` (+13 -0) 📝 `go.mod` (+2 -0) 📝 `go.sum` (+5 -0) 📝 `internal/core/persistence/persistence_test.go` (+3 -0) 📝 `internal/core/plugin_manager/debugging_runtime/server_test.go` (+55 -29) 📝 `internal/db/executor.go` (+0 -0) 📝 `internal/db/executor_test.go` (+4 -2) 📝 `internal/db/init.go` (+26 -79) ➕ `internal/db/mysql/dialector.go` (+45 -0) ➕ `internal/db/mysql/mysql.go` (+82 -0) ➕ `internal/db/pg/pg.go` (+73 -0) 📝 `internal/types/app/config.go` (+1 -0) 📝 `internal/types/app/default.go` (+5 -1) 📝 `internal/types/models/base.go` (+10 -0) </details> ### 📄 Description In this PR, I added a new module `internal/db/mysql`, which implements the `initDifyPluginDB` of MySQL. Models definitions that are incompatible with MySQL (such as uuid types and text fields) are rewritten through custom dialector and migrator. These changes will not affect the original postgresql process. PTAL @Yeuoly --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 01:15:34 -05:00
yindo closed this issue 2026-02-16 01:15:34 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#329