-
Notifications
You must be signed in to change notification settings - Fork 8.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(migrations): correct parent_message_id for service-api records #9132
fix(migrations): correct parent_message_id for service-api records #9132
Conversation
- Set default parent_message_id to UUID_NIL when it's null for service-api entries post v0.9.0 release. - Provide downgrade path to reset parent_message_id back to null in case of rollback.
cc @xuzuodong |
LGTM |
When trying to update to 9.1-fix1 or 9.2, still facing this issue. Following are the api container logs:
|
Did you deploy using the source code? Have you run |
Im deployed via docker |
If you upgraded to any beta version before, you may need to downgrade your database. |
Ive always checked out the main branch so don't think Ive upgraded to a beta version.... but even if this is the case, how would I downgrade the database? |
If you're using Docker for deployment, here's what you need to do:
This process requires some knowledge and experience. Searching for Alembic and Flask-Migrate might be helpful for you. Alternatively, you could delete the entire dify directory and redeploy, but keep in mind that this will result in the loss of all your data. |
my current dify version is 0.8.3 I upgraded back to 0.8.3 and consecutively tried upgrading to 0.9.0 and 0.9.1-fix1. Both times, got the following error logs:
Another dify instance which I am running had no problems upgrading, that is where we run tests and develop workflows. The current instance where this problem is being faced is running in production and too much of data is on it for us to delete it completely. Thanks a lot for your continued support, really hope we can find a solution to this |
@laipz8200 any suggestions on how to fix this? |
@laipz8200 have resolved this issue. The migration scripts were not able to run as there was a duplicate record in the messages table. |
How can I use the API to modify historical conversation messages without this parameter? @AllenWriter all |
Checklist:
Important
Please review the checklist below before submitting your pull request.
dev/reformat
(backend) andcd web && npx lint-staged
(frontend) to appease the lint godsDescription
This PR is a follow-up to #8965. We are updating the parent IDs of all historical messages from service-api to NIL to ensure they can be treated as compatible with older versions of the data.
Type of Change
Testing Instructions
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration