Changing custom thread fields values in mysql database for large number of threads (no batch option available)

Xiomera

Member
The light grey text is the background to my problem (not relevent for the MySQL question)

Dear forum,

my basic intention is to change the field type of an custom thread field from "check boxes" to "radio buttons" (only 1 option should be selectable). Since this change is not possible directly in the custom thread fields options I tryed different solutions.
(My forum is already alive and creating a new custom thread field and setting the same values for this new field and after that deleting the old one would be a lot of nonsense work)

First I tryed to use the batch threads tool in the backoffice (Forums>Batch update threads). You can filter the threads via all custom thread fields and more, but when you have your selection you have no other options than moving, deleting, etc. So doesn't work for me.

After that I thought I could change the values directly in the MySQL database, BUT when I make any kind of changes, the changes are not active in the forum. And when I rebuild the cache for thread fields (Tools>Rebuild caches>Rebuild Thread Fields) the changes made in the database are gone and everything is like before.
Is there somewhere on the xenforo2 installation a cache or something like that, which prevents the database changes to be active?

This are my 2 solution paths (first one would be better):

  1. Just change the field_id (new custom field has the same values, but "radio buttons" instead of "check boxes") & field_value (if your field type allows multiselect like check boxes the field_value looks like "a:1:{s:6:"Boston";s:6:"Boston";}" while the same value looks with radio buttons in the database like this "Boston")
  2. Or create a new custom field entry for every thread with the new field_id and the right field_value.
Ps: the data I am speaking of is in the table "xf_alff_field_data" and in the 2 fields "field_id, field_value". I am using XF2.1.0

My final MySQL question is: Is it possible to change custom thread fields directly in the database. What do I need to know and take care of, that the changes are effectiv in my forum. For now when i change anything nothing happens in the forum front and when I do a rebuild all changes made in the database are gone and like before.

Best regards

-Xiomera
 
Top Bottom