maker-bundle icon indicating copy to clipboard operation
maker-bundle copied to clipboard

Make:entity - Allow to update fields in an existing Entity

Open fdiedler opened this issue 3 years ago • 3 comments

Hi,

Is it possible to update fields in an existing Entity with make:entity ? I propose to add this feature that seems very useful when you want to edit the type of a fields or its name.

Thanks,

fdiedler avatar Feb 25 '22 09:02 fdiedler

Hi, I vote in favour. That's a good idea. You should add label feature to this issue

ppodgorskicrido avatar Jun 08 '22 10:06 ppodgorskicrido

I believe this hasn't been implemented yet because it has too many side effects:

  • Changing the name of the property could affect other implementations in other classes
  • If you change the relation, the relation of the inverse entity would also change, which in turn affects other classes
  • If you change the data type of a property, a migration for that could be difficult to create if the old and the new data type are not compatible to each other (e.g. simple_array to string)

dsentker avatar Jul 22 '22 08:07 dsentker

What if we do it manually anyway ? Personnally, I just need to modify the length of a varchar property as I forgot that the content of that one property will hashed using SHA algorythm.

FrozenCell239 avatar Jul 09 '23 15:07 FrozenCell239