Allow original songs to be derived from another song #1587
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As it turns out, original/base versions of original songs can already be added to the database, just that there's a bunch of special casing to try to hide that fact from the frontend and the API.
This PR just removes the special cases, allowing:
Things that are currently missing from this PR
Breaking changes
Original songs that have an original version entered in the database will show that in the UI
People could accidentally enter in an original version (and not realise it, as it's hidden). Those entries should be removed/fixed before this PR makes it in.
I'd like to see which songs are affected. In the spirit of not DoS-ing VocaDB, this is best queried directly from the database:
Behaviour on current version of live website
You can already add an original version to an original song on the live website:
You can see a song changed this way in https://vocadb.net/Song/ViewVersion/1714212.
But it won't show on the main song page.
Note the absence of
originalVersionId
in the API request for the original songand the inclusion of the original song in the base's derived songs.