[PR #1938] [MERGED] feat: consolidate the concept of owner and collaborators #1962

Closed
opened 2026-02-26 03:32:53 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/koel/koel/pull/1938
Author: @phanan
Created: 6/3/2025
Status: Merged
Merged: 6/3/2025
Merged by: @phanan

Base: masterHead: playlist-rel


📝 Commits (1)

  • 073f6e0 feat: consolidate the concept of owner and collaborators

📊 Changes

44 files changed (+284 additions, -273 deletions)

View changed files

📝 app/Http/Controllers/API/PlaylistCollaboration/PlaylistCollaboratorController.php (+1 -1)
📝 app/Http/Resources/PlaylistResource.php (+3 -2)
📝 app/Models/Playlist.php (+22 -16)
📝 app/Models/User.php (+14 -7)
📝 app/Repositories/AlbumRepository.php (+4 -7)
📝 app/Repositories/ArtistRepository.php (+4 -12)
📝 app/Repositories/PlaylistRepository.php (+4 -16)
📝 app/Repositories/PodcastRepository.php (+0 -1)
📝 app/Services/PlaylistCollaborationService.php (+5 -7)
📝 app/Services/PlaylistService.php (+6 -1)
📝 app/Services/SmartPlaylistService.php (+4 -2)
📝 app/Services/SongService.php (+1 -1)
📝 database/factories/PlaylistCollaborationTokenFactory.php (+3 -2)
📝 database/factories/PlaylistFactory.php (+0 -2)
database/migrations/2025_06_03_121538_modify_playlist-user_relationship.php (+42 -0)
📝 resources/assets/js/__tests__/factory/playlistFactory.ts (+1 -1)
📝 resources/assets/js/components/playlist/PlaylistCollaborationModal.vue (+1 -1)
📝 resources/assets/js/components/playlist/PlaylistCollaboratorList.vue (+4 -4)
📝 resources/assets/js/components/playlist/PlaylistContextMenu.spec.ts (+1 -1)
📝 resources/assets/js/components/screens/PlaylistScreen.spec.ts (+1 -1)

...and 24 more files

📄 Description

A playlist owner was previously identified by the user_id field in the playlists table. With the addition of playlist collaboration, a playlist_collaborators table was added. This PR consolidates both the owner and the collaborators of a playlist into this playlist_collaborators (now renamed to playlist_user) table and uses a role column to differentiate them.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/koel/koel/pull/1938 **Author:** [@phanan](https://github.com/phanan) **Created:** 6/3/2025 **Status:** ✅ Merged **Merged:** 6/3/2025 **Merged by:** [@phanan](https://github.com/phanan) **Base:** `master` ← **Head:** `playlist-rel` --- ### 📝 Commits (1) - [`073f6e0`](https://github.com/koel/koel/commit/073f6e05e387aed56999fb88b9cc7109521de6be) feat: consolidate the concept of owner and collaborators ### 📊 Changes **44 files changed** (+284 additions, -273 deletions) <details> <summary>View changed files</summary> 📝 `app/Http/Controllers/API/PlaylistCollaboration/PlaylistCollaboratorController.php` (+1 -1) 📝 `app/Http/Resources/PlaylistResource.php` (+3 -2) 📝 `app/Models/Playlist.php` (+22 -16) 📝 `app/Models/User.php` (+14 -7) 📝 `app/Repositories/AlbumRepository.php` (+4 -7) 📝 `app/Repositories/ArtistRepository.php` (+4 -12) 📝 `app/Repositories/PlaylistRepository.php` (+4 -16) 📝 `app/Repositories/PodcastRepository.php` (+0 -1) 📝 `app/Services/PlaylistCollaborationService.php` (+5 -7) 📝 `app/Services/PlaylistService.php` (+6 -1) 📝 `app/Services/SmartPlaylistService.php` (+4 -2) 📝 `app/Services/SongService.php` (+1 -1) 📝 `database/factories/PlaylistCollaborationTokenFactory.php` (+3 -2) 📝 `database/factories/PlaylistFactory.php` (+0 -2) ➕ `database/migrations/2025_06_03_121538_modify_playlist-user_relationship.php` (+42 -0) 📝 `resources/assets/js/__tests__/factory/playlistFactory.ts` (+1 -1) 📝 `resources/assets/js/components/playlist/PlaylistCollaborationModal.vue` (+1 -1) 📝 `resources/assets/js/components/playlist/PlaylistCollaboratorList.vue` (+4 -4) 📝 `resources/assets/js/components/playlist/PlaylistContextMenu.spec.ts` (+1 -1) 📝 `resources/assets/js/components/screens/PlaylistScreen.spec.ts` (+1 -1) _...and 24 more files_ </details> ### 📄 Description A playlist owner was previously identified by the `user_id` field in the `playlists` table. With the addition of playlist collaboration, a `playlist_collaborators` table was added. This PR consolidates both the owner and the collaborators of a playlist into this `playlist_collaborators` (now renamed to `playlist_user`) table and uses a `role` column to differentiate them. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 03:32:53 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/koel-koel#1962
No description provided.