Repository navigation
Conversation
Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Mario Alfonso Pym Mejía <pymm@hitss.com>
|
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! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
come-nc
left a comment
There was a problem hiding this comment.
I would say the tests for migrations are overkill, migration code is not expected to change that much, we should not add a test for each migration like this.
Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Mario Alfonso Pym Mejía <pymm@hitss.com>
Makes sense, I removed the migration tests. |
Summary
Some core migrations add columns and indexes without checking first whether they already exist. On a clean upgrade this is fine, but when a migration runs again (for example after an interrupted upgrade, in our case from 29 to 33, or on a schema that already has these columns), the upgrade stops with "already exists" errors and the migration is never recorded as done.
This adds
hasColumn()/hasIndex()checks to:Version30000Date20240815080800(webauthn.user_verification)Version31000Date20240814184402(preferenceslazy/type/flags/indexed columns and their indexes)Version33000Date20251023120529(unique_bucket_storeindex onpreview_locations)This follows the same pattern already used in
Version30000Date20240717111406and in the files_trashbin migrations.Checklist
3. to review, feature component)stable32)AI (if applicable)