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
Not null violation error in migrations #3148
Not null violation error in migrations #3148
Conversation
The column is supposed to be nullable, and updating the app throws `column "session_id" contains null values` error because it was not nullable. Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com> Signed-off-by: Faraz Samapoor <fsa@adlas.at>
Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com> Signed-off-by: Faraz Samapoor <fsa@adlas.at>
381be4f
to
ccf63b8
Compare
Yes. right, the definition is wrong. But what confused me, is that there was an error triggered. The table gets dropped and recrated with updates. Unfortunately you did not provide an issue with your system setup and the triggered error message Edit: ok. I can interprate the location of the error. But there should no error message, because the table should have no entiries. |
I don't have direct access to the Nextcloud instance our deployment team attempted to upgrade. I know it was a v24 Nextcloud server using Postgres, and the plan was to upgrade it to v26. I'll provide the necessary information in a new issue once I gain access to the server. |
Yes. Would be good. Possibly there is a migration path, I did not take into account. |
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! |
A bug has been introduced with 3da60e4 which is causing migration errors when you try to upgrade the app.
Having a non-nullable column with the default value of
null
is definitely not right. likely introduced by mistake with the refactoring of the class.In this PR, I have made the
session_id
column nullable which is the intended behavior.I have also reviewed all other combinations on the file and found no other non-nullable columns with a default value of
null
.This is not being reflected with the new installations of the app, as the database handles the error seamlessly. However, as mentioned earlier, an error is thrown when upgrading older versions of the app.