Specify string length on Blueprint::morph method #43001
Unanswered
AntoineDewaele
asked this question in
Ideas
Replies: 2 comments
-
I totally agree. Since the type is usually less than 10 characters, that's a pity to allocate this amount of memory needed in temporary table during complex query. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Would be awesome ! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there !
I realize that the
morphs
method always setup astring(255)
database column for the{{morph}}_type
:But for some performances reasons, it could be usefull to reduce this lenght and the only way to do this right now is to manually create the morph type, morph id and indexes.
Maybe, we could add a third optionnal parameter to make this work, like for example :
This way, we could use the method like this :
I'm not sure about this parameter name but that could be the idea.
This change could be applied on all the morph methods like
nullableMorphs
,nullableNumericMorphs
,uuidMorphs
and so on..What do you think aout this ?
Beta Was this translation helpful? Give feedback.
All reactions