Support

Account

Home Forums Backend Issues (wp-admin) Migrating a repeater into a nested repeater using phpMyAdmin Reply To: Migrating a repeater into a nested repeater using phpMyAdmin

  • This would be extremely difficult to do with phpMyAdmin.

    Existing repeater values in the db

    
    meta_key                                         | value
    --------------------------------------------------------------------------
    {$repeater_name}                                 | {count($repeater_rows)}
    _{$repeater_name}                                | {$repeater_field_key}
    {$repeater_name}_{$row_index}_{$sub_field_name}  | {$sub_field_value}
    _{$repeater_name}_{$row_index}_{$sub_field_name} | {$sub_field_key}
    

    what they would need to be changed to

    
    meta_key                                                                             | value
    ---------------------------------------------------------------------------------------------------------------------------
    {$repeater_name}                                                                     | {count($repeater_rows)}
    _{$repeater_name}                                                                    | {$repeater_field_key}
    {$repeater_name}_{$row_index}_{$nested_repeater_name}                                | {count($nested_repeater_rows)}
    _{$repeater_name}_{$row_index}_{$nested_repeater_name}                               | {$nested_repeater_key}
    {$repeater_name}_{$row_index}_{$nested_repeater_name}_{$row_index}_{$sub_field_name} | {$sub_field_value}
    _{$repeater_name}_{$row_index}_{$nested_repeater_name}_{$row_index}_{$sub_field_name} | {$sub_field_key}