IRSS: Change il_resource_flavour.variant to length 638#11718
Open
lscharmer wants to merge 1 commit into
Open
Conversation
f8a9c17 to
5ba7c96
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR fixes an issue with the table
il_resource_flavourwhen changing the database collation from utf8mb3 to utf8mb4.Currently the table cannot be converted to utf8mb4 because the key for the table will be too long:
This PR shortens the length of the
variantfield from 768 to 638, which is small enough.I found one theoretically problematic place:
In
ILIAS\ResourceStorage\Flavour\Definition\CropToRectangle2 concatenated ints and 1 float are saved. Without the float the value has a max length of 40, which leaves 598 chars for the float. Theoretically this is not enough to store every float as a string but the previous value of 728 chars for the float wouldn't cover every float either. So I hope this is still acceptable.For completeness here are all other (unproblematic) places with their max variant length, in case that I missed something:
ILIAS\ILIASObject\Properties\CoreProperties\TileImage\FlavourDefinition.php: Constant 79 charsFirstPageToTileImageFlavourDefinition: Constant 79 charsilUserProfilePictureDefinition: Constant 71 charsILIAS\ResourceStorage\Flavour\Definition\CropToSquare: Max 39 charsILIAS\ResourceStorage\Flavour\Definition\FitToSquare: Max 39 charsILIAS\ResourceStorage\Flavour\Definition\PagesToExtract: Max 64 charsILIAS\ResourceStorage\Flavour\Definition\FlavourDefinition\ZipStructureDefinition: Saves nullILIAS\ResourceStorage\Flavour\Definition\ToGreyScale: Saves nullThis PR is in preparation for an upcoming PR to change the Database charset & collation from utf8mb3 to utf8mb4.