fix(Migration): Don't create empty notnull column - #1350
Conversation
fixes #1347 Signed-off-by: Marcel Klehr <mklehr@gmx.net>
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a database migration issue where a new column was being created with a not-null constraint without providing a default value, which would cause migration failures on existing databases with data.
- Changed the
face_vectorcolumn creation to allow null values initially - Added a subsequent migration to set the column to not-null after creation
- Improved migration logic to handle multiple column operations in a single migration
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| lib/Migration/Version010000001Date20250727094721.php | Modified column creation to allow null values initially |
| lib/Migration/Version010000001Date20250727094821.php | Added logic to set column to not-null and improved return handling |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Marcel Klehr <mklehr@gmx.net>
|
/backport to stable9 |
|
/backport to stable10 |
|
The backport to # Switch to the target branch and update it
git checkout stable10
git pull origin stable10
# Create the new backport branch
git checkout -b backport/1350/stable10
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 5410b6d2 e79f8ebc
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/1350/stable10Error: Failed to check for changes with origin/stable10: No changes found in backport branch Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports. |
|
/backport to stable8 |
|
The backport to # Switch to the target branch and update it
git checkout stable8
git pull origin stable8
# Create the new backport branch
git checkout -b backport/1350/stable8
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 5410b6d2 e79f8ebc
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/1350/stable8Error: Failed to check for changes with origin/stable8: No changes found in backport branch Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports. |
fixes #1347