1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Lack of Interest Alternative to ENUM DB Fields

Discussion in 'Closed Suggestions' started by xf_phantom, May 21, 2013.

  1. xf_phantom

    xf_phantom Well-Known Member

    Please get rid of the enum fields
    I'm not sure what's the best way to add own members to the enum column

    For personal usage, it's not a problem to add & remove them because i know exactly what members are used, but i can't put it into an addon installcode without some hacking (e.g. i plan to read the table schema info, get the members, add my own and alter the table)

    Specially for the user field table it's needed to add own display groups (see http://xenforo.com/community/threads/adding-new-display-groups-to-the-userfields.50654/ ) and it would be really nice if we wouldn't need some hacking to add them:p
  2. AlexT

    AlexT Well-Known Member

    Why not follow Jake's suggestion and create a new field for your custom categories?
  3. xf_phantom

    xf_phantom Well-Known Member

    a new field?

    I can't create a new display group without editing the enum column

    even if i would add all new display groups into a new table/column, i would need to add at least 1 new member (custom) to the display_group column
  4. AlexT

    AlexT Well-Known Member

    Yes, a new field. Call it display_group_custom or whatever you like, and then extend the respective methods that are needed for your purposes (specifically in XenForo_Model_UserField and the UserField Datawriter). Granted, it would be easier if you had a free choice of the values in the display_group field, but as long as this is not the case, creating a new field would work as well.

Share This Page