Skip to content

Conversation

@come-nc
Copy link
Contributor

@come-nc come-nc commented Feb 14, 2022

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]

@come-nc come-nc added the 2. developing Work in progress label Feb 14, 2022
@come-nc come-nc added this to the Nextcloud 24 milestone Feb 14, 2022
@come-nc come-nc self-assigned this Feb 14, 2022
@come-nc come-nc force-pushed the enhancement/user_migration-version-handling branch from 165d8a9 to a2efe13 Compare February 14, 2022 15:55
@Pytal
Copy link
Member

Pytal commented Feb 14, 2022

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.

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

@come-nc come-nc force-pushed the enhancement/user_migration-version-handling branch from ee0e040 to 98fe083 Compare February 15, 2022 09:13
@come-nc come-nc marked this pull request as ready for review February 15, 2022 15:51
@come-nc come-nc requested a review from Pytal February 15, 2022 15:51
@come-nc come-nc added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Feb 15, 2022
@Pytal Pytal requested review from a team, juliusknorr, nickvergessen and skjnldsv and removed request for a team February 15, 2022 16:20
@Pytal Pytal added the feature: user migration Related to User migration label Feb 15, 2022
@come-nc come-nc force-pushed the enhancement/user_migration-version-handling branch from 98fe083 to 885b790 Compare February 17, 2022 17:09
Copy link
Member

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@PVince81
Copy link
Member

please update autoloaders, the checkers are unhappy

Signed-off-by: Côme Chilliet <[email protected]>
Signed-off-by: Côme Chilliet <[email protected]>
@come-nc come-nc merged commit 5b565a4 into master Feb 22, 2022
@come-nc come-nc deleted the enhancement/user_migration-version-handling branch February 22, 2022 08:02
@ChristophWurst ChristophWurst added the pending documentation This pull request needs an associated documentation update label Dec 4, 2025
@ChristophWurst
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews feature: user migration Related to User migration pending documentation This pull request needs an associated documentation update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants