make flask migration models compatible to both postgresql and mysql
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>orResolves #<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) andcd web && npx lint-staged(frontend) to appease the lint gods
Hi there! Compatibility with MySQL isn't currently in our plans.
@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
@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
We will consider contributing at a more suitable time in the future. This PR is temporarily closed for now.