[PR #202] [MERGED] fix mysql create and add test for mysql transaction #366

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

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugin-daemon/pull/202
Author: @whhe
Created: 4/14/2025
Status: Merged
Merged: 4/14/2025
Merged by: @Yeuoly

Base: mainHead: mysql_insert


📝 Commits (1)

  • 497674e fix mysql create and add test for mysql transaction

📊 Changes

2 files changed (+97 additions, -29 deletions)

View changed files

📝 internal/db/executor_test.go (+90 -29)
📝 internal/db/mysql/dialector.go (+7 -0)

📄 Description

Close #193

Now the id colum will be set twice:

  1. https://github.com/go-gorm/gorm/blob/v1.25.11/callbacks/create.go#L248-L254
  2. https://github.com/go-gorm/gorm/blob/v1.25.11/callbacks/create.go#L305-L316

In this PR I removed id column from FieldsWithDefaultDBValue in field.Schema and add a test case for it.


🔄 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/202 **Author:** [@whhe](https://github.com/whhe) **Created:** 4/14/2025 **Status:** ✅ Merged **Merged:** 4/14/2025 **Merged by:** [@Yeuoly](https://github.com/Yeuoly) **Base:** `main` ← **Head:** `mysql_insert` --- ### 📝 Commits (1) - [`497674e`](https://github.com/langgenius/dify-plugin-daemon/commit/497674e781fa00d68334607a8d24a303a74b8153) fix mysql create and add test for mysql transaction ### 📊 Changes **2 files changed** (+97 additions, -29 deletions) <details> <summary>View changed files</summary> 📝 `internal/db/executor_test.go` (+90 -29) 📝 `internal/db/mysql/dialector.go` (+7 -0) </details> ### 📄 Description Close #193 Now the id colum will be set twice: 1. https://github.com/go-gorm/gorm/blob/v1.25.11/callbacks/create.go#L248-L254 2. https://github.com/go-gorm/gorm/blob/v1.25.11/callbacks/create.go#L305-L316 In this PR I removed id column from FieldsWithDefaultDBValue in field.Schema and add a test case for it. --- <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:45 -05:00
yindo closed this issue 2026-02-16 01:15:45 -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#366