-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Add version handling to IMigrator #31173
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
Conversation
165d8a9 to
a2efe13
Compare
Yes this sounds good, then the migrator itself can decide what to do. For calendar since there are edge cases that don't make sense to handle we'll probably cancel the import on null |
ee0e040 to
98fe083
Compare
Signed-off-by: Côme Chilliet <[email protected]>
Signed-off-by: Côme Chilliet <[email protected]>
…m source Signed-off-by: Côme Chilliet <[email protected]>
98fe083 to
885b790
Compare
PVince81
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
|
please update autoloaders, the checkers are unhappy |
Signed-off-by: Côme Chilliet <[email protected]>
Signed-off-by: Côme Chilliet <[email protected]>
|
FYI these changes are not on https://docs.nextcloud.com/server/latest/developer_manual/digging_deeper/user_migration.html#register-a-migrator |
Also adds a trait to implement basic version handling suited for most cases: forbids importing newer versions.
Question:
Maybe we should make the $version parameter of canImport nullable, with null meaning the migrator was not present in the export. In which case the function should return true to run anyway, and false to stop the import as not compatible.
Signed-off-by: Côme Chilliet [email protected]