dify icon indicating copy to clipboard operation
dify copied to clipboard

make flask migration models compatible to both postgresql and mysql

Open whhe opened this issue 9 months ago • 1 comments

Summary

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

[!Tip] Close issue syntax: Fixes #<issue number> or Resolves #<issue number>, see documentation for more details.

This PR is a merge of https://github.com/langgenius/dify/pull/15653 and https://github.com/langgenius/dify/pull/15757, I tried my best to keep the columns in models, and the table structures in postgresql should not change in general.

Resolves #15411 and resolves #15756.

Screenshots

Before After
... ...

Checklist

[!IMPORTANT]
Please review the checklist below before submitting your pull request.

  • [ ] This change requires a documentation update, included: Dify Document
  • [x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • [ ] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • [ ] I've updated the documentation accordingly.
  • [x] I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

whhe avatar Mar 19 '25 20:03 whhe

Hi there! Compatibility with MySQL isn't currently in our plans.

laipz8200 avatar Mar 31 '25 12:03 laipz8200

@whhe Using these changes, can the MySQL database be used? Have you conducted advance tests on your side?

We are planning to migrate to mysql

FyhSky avatar Jul 01 '25 12:07 FyhSky

@whhe Using these changes, can the MySQL database be used? Have you conducted advance tests on your side?

We are planning to migrate to mysql

You can try on https://github.com/oceanbase/dify-on-mysql/tree/1.4.0

whhe avatar Jul 01 '25 12:07 whhe

We will consider contributing at a more suitable time in the future. This PR is temporarily closed for now.

whhe avatar Jul 01 '25 12:07 whhe