Support

Account

Home Forums Feature Requests Migrations

Solved

Migrations

    • weblyan

    • January 22, 2014 at 1:47 am

    When we are developing a site, we might have 3-4 versions of the site on different enviroments with different databases. This is a problem when syncing with git sence the acf settings are not theme specific, but database specific.
    It would be great if the fields structure could somehow be stored with the theme so it can be commited so that the fields and theme updates can be commited and deployed together.

    Maybe some kind of version of migrations like in Laravel?

    • Elliot

    • January 22, 2014 at 11:50 am

    Hi @weblyan

    You can use the Export to PHP feature to keep your field data in your theme. This allows git to sync the fields!

    Thanks
    E

    • weblyan

    • January 22, 2014 at 7:20 pm

    I’ve used this featured but I’m not 100% satisfied with this feature. It does help with binding field logic to a theme, but it does not help with version control and local development. This feature is a one way export. Once it has been exported and transfered to another enviroment, I can not easily change or extend these settings. Also, this method doesn’t work well with merging two different setups that has been developed separatly.

    Maybe an alternative option to store all, or maybe just a fieldset’s, structure as a json document (like composer) in the active theme, instead of the database.

    • Elliot

    • January 23, 2014 at 12:00 pm

    Hi @weblyan

    Thanks for the feedback. You may be pleased to hear that ACF5 (soon to be released) contains an auto read/write JSON feature.

    Each field group writes a separate .json file, so you can add a new field group on site b and then pull it down to site a, etc.

    Hope that helps.

    Thanks
    E

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.