Skip to content
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

migrating custom groups #1685

Merged
merged 3 commits into from
Oct 22, 2024
Merged

migrating custom groups #1685

merged 3 commits into from
Oct 22, 2024

Conversation

ArtificialOwl
Copy link
Member

@ArtificialOwl ArtificialOwl commented Sep 10, 2024

migrate owncloud's Custom Groups to Teams

for each Custom Group (CG):

  • creating Team using CG oldest Admin as Owner
  • adding CG members to generated Team
  • leveling other Admins from CG as Admin in generated Team,
  • converting shares to CG to generated Team,
  • fixing children shares

original data

+--------------+---------------------+------+-----+---------+----------------+
| Field        | Type                | Null | Key | Default | Extra          |
+--------------+---------------------+------+-----+---------+----------------+
| group_id     | bigint(20) unsigned | NO   | PRI | NULL    | auto_increment |
| uri          | varchar(255)        | NO   | UNI | NULL    |                |
| display_name | varchar(64)         | NO   |     | NULL    |                |
+--------------+---------------------+------+-----+---------+----------------+

+----------+---------------------+------+-----+---------+-------+
| Field    | Type                | Null | Key | Default | Extra |
+----------+---------------------+------+-----+---------+-------+
| group_id | bigint(20) unsigned | NO   | PRI | NULL    |       |
| user_id  | varchar(64)         | NO   | PRI | NULL    |       |
| role     | int(11)             | NO   |     | 0       |       |
+----------+---------------------+------+-----+---------+-------+

Copy link
Member

@mejo- mejo- left a comment

Choose a reason for hiding this comment

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

I have no idea about owncloud and their custom groups functionality, but apart from one comment i didn't spot anything obvious ☺️

lib/Command/MigrateCustomGroups.php Outdated Show resolved Hide resolved
Copy link
Member

@mejo- mejo- left a comment

Choose a reason for hiding this comment

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

Code changes look sensible now. Thanks for adding additional context to the PR description. I didn't test this, bug I guess you did 😉

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
@ArtificialOwl ArtificialOwl merged commit a0efde1 into master Oct 22, 2024
29 checks passed
@ArtificialOwl ArtificialOwl deleted the enh/noid/migration-oc branch October 22, 2024 11:00
@ArtificialOwl
Copy link
Member Author

/backport to stable30

Copy link

backportbot bot commented Oct 22, 2024

The backport to stable30 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable30
git pull origin stable30

# Create the new backport branch
git checkout -b backport/1685/stable30

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 1bbc440e ee7d2d67 49e748da

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/1685/stable30

Error: Failed to cherry pick commits: error: no cherry-pick or revert in progress
fatal: cherry-pick failed


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

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

Successfully merging this pull request may close these issues.

2 participants