DB_TYPE set mysql plugin_declarations insert find error "Error 1110 (42000): Column 'id' specified twice" #82

Closed
opened 2026-02-16 00:19:40 -05:00 by yindo · 2 comments
Owner

Originally created by @niceshall on GitHub (Apr 10, 2025).

Self Checks

This is only for bug report, if you would like to ask a question, please head to Discussions.

I have searched for existing issues search for existing issues, including closed ones.

I confirm that I am using English to submit this report (我已阅读并同意 https://github.com/langgenius/dify/issues/1542).

[FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)

Please do not modify this template :) and fill in all the required fields.
Dify version
1.1.3

Cloud or Self Hosted
Self Hosted (Docker)

Steps to reproduce
dify-plugin-daemon set env
.env
DB_TYPE=mysql

Image

and install plugin in markplace fine error
Error 1110 (42000): Column 'id' specified twice

Image

error log
Image

✔️ Expected Behavior
INSERT INTO plugin_declarations (id,created_at,updated_at,plugin_unique_identifier,plugin_id,declaration)

Actual Behavior
INSERT INTO plugin_declarations (id,created_at,updated_at,plugin_unique_identifier,plugin_id,declaration,id)

I find dify-plugin-daemon/internal/db/mysql/dialector.go line:38 set field.HasDefaultValue = true can resolve this problem
Image

Originally created by @niceshall on GitHub (Apr 10, 2025). Self Checks This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. I confirm that I am using English to submit this report (我已阅读并同意 https://github.com/langgenius/dify/issues/1542). [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) Please do not modify this template :) and fill in all the required fields. Dify version 1.1.3 Cloud or Self Hosted Self Hosted (Docker) Steps to reproduce dify-plugin-daemon set env .env DB_TYPE=mysql <img width="248" alt="Image" src="https://github.com/user-attachments/assets/a92c88d1-ebd9-4bff-9058-ad86e61fc369" /> and install plugin in markplace fine error Error 1110 (42000): Column 'id' specified twice ![Image](https://github.com/user-attachments/assets/e9e55472-bdf9-4da6-a3dd-fb98d66a53dc) error log <img width="1326" alt="Image" src="https://github.com/user-attachments/assets/cacba6d0-a126-49c7-82fc-12246b9d03a2" /> ✔️ Expected Behavior INSERT INTO `plugin_declarations` (`id`,`created_at`,`updated_at`,`plugin_unique_identifier`,`plugin_id`,`declaration`) ❌ Actual Behavior INSERT INTO `plugin_declarations` (`id`,`created_at`,`updated_at`,`plugin_unique_identifier`,`plugin_id`,`declaration`,`id`) I find dify-plugin-daemon/internal/db/mysql/dialector.go line:38 set field.HasDefaultValue = true can resolve this problem <img width="746" alt="Image" src="https://github.com/user-attachments/assets/4b5059ef-66c6-4f9e-a509-4c5a5aa93c66" />
yindo closed this issue 2026-02-16 00:19:40 -05:00
Author
Owner

@Yeuoly commented on GitHub (Apr 11, 2025):

@whhe Hi, could you pls take a look at this?

@Yeuoly commented on GitHub (Apr 11, 2025): @whhe Hi, could you pls take a look at this?
Author
Owner

@whhe commented on GitHub (Apr 14, 2025):

Thanks for your feedback @niceshall

I created a patch for it at https://github.com/langgenius/dify-plugin-daemon/pull/202, it should resolve this issue.

@whhe commented on GitHub (Apr 14, 2025): Thanks for your feedback @niceshall I created a patch for it at https://github.com/langgenius/dify-plugin-daemon/pull/202, it should resolve this issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#82