Repeating fields is going to be awesome – but we need to decide how to store this data.
We have a few options:
- For each ‘repeatable’ field, have a separate table devoted to it that has these fields: id, related_id, and value (stored as the field’s type, like date, number, etc..)
- For each ‘repeatable’ field’s Pod, have a separate table devoted to it that has these fields: id, related_id, field_id, and value (longtext)
- Have a catchall table for ‘repeatable’ data called wp_pods_repeatable that has these fields: id, pod_id, related_id, field_id, and value (longtext)
- Store repeatable field data within the same ‘pod’ table such as wp_pods_tbl_mypod.my_field_name (longtext – json array of values)
I’m also considering an additional field to whatever table we figure out this data should go in called meta (longtext, extensible to include other data) but I’m not sure if that’s useful.
I’m really leaning towards option #1, but feel free to chime in here with any +1 or -1 comments.
UPDATE: Seems everyone is voting for #1, which seems to be the best option regardless of the caveats of the additional tables – it comes down to what is the best for the developer and the data itself.