ACF Custom Database Tables 1.1 is now in beta and we’ve got a few features that we hope you’ll love!
Control your column data types
Using a few simple filters, you’ll now be able to control the data types of your custom database table columns. Until now, we’ve stuck to the type WordPress uses for metadata – longtext – but as of version 1.1, you’ll be able to use whatever data type makes the most sense for your application.
Run your own custom code as part of the table update process
We’ve also added a few filters for running custom actions after changes are made to the database schema. The filters run after each table is updated making it possible for you run custom code specific to a table. The filters also provide the opportunity for you to add custom output messages to the admin notification.
These new hooks will allow you to run any code you like as part of the table update process so you can easily create table indexes, run ALTER statements on the updated table schema, or even run custom logging or notification systems.
Improved Redis Support
We had a few reports in the past of people having issues on Redis that we were previously unable to reproduce in our testing environments. I’m happy to report that we’ve managed to debug and adjust our code to better support Redis-backed object caches.
Repeater Field Support
As of version 1.1, you’ll be able to store repeater data in your custom database tables.
By default, repeater data is stored as encoded JSON in a single table column but through the use of a simple filter, you’ll be able to configure your repeater fields to create their own “sub-tables” where each row of a repeater is represented by a row in the table.
This is an exciting feature as you’ll now be able to write custom SQL queries targeting your repeater data. Additionally, you’ll also be able to easily visualise your repeater data using your favourite database client.
A note on nested repeaters: at this stage, nested repeaters will just be encoded data within a single table field.
That’s all we have to share today. We are working through our beta testing phase which will likely take a few weeks. Stay tuned for the official release by joining our mailing list (sign up in the site footer) or following us on Twitter.
If you have any questions, don’t hesitate to reach out to us at email@example.com.