We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13808
    • 61 Posts
    I’ve worked through this tutorial with great success, turning out my own variation on the theme.
    http://rtfm.modx.com/display/revolution20/Using+Custom+Database+Tables+in+your+3rd+Party+Components

    I now find myself wanting to add another field to the database due to an error in my design. Can someone answer before I destroy anything: can I just update the schema xml file, run the build again and be on my merry way or is it more complex than that?

    If it’s that simple, I think I’m in love with my first foray into frameworks...
      • 28215
      • 4,149 Posts
      Quote from: jcurtis at Mar 01, 2011, 05:37 AM

      I now find myself wanting to add another field to the database due to an error in my design. Can someone answer before I destroy anything: can I just update the schema xml file, run the build again and be on my merry way or is it more complex than that?
      Since xPDO does not yet support synchronization between schema and DB, you’ll need to manually add the column into your DB table, and then yes - just update the schema xml file and rerun the schema build file. You don’t need to delete any files; it will automatically overwrite the maps.

      xPDO will handle redoing all the maps when you rerun the build. It will not regenerate the classes (as you don’t want it to!), just the maps. The only manual part you will have to do is add the column into the DB table as I described above.
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com