Search code examples
pdomodxmodx-revolution

How can I add column to an existing custom table in MODX database?


I have a custom table in MODX database set up and working, thanks to this article: http://bobsguides.com/custom-db-tables.html and now I need to add new column to this existing table. How can I do this the "MODX way"? Or do I have to create the component from scratch again?


Solution

  • You can manually add the new column to the database, then update your xml schema and map files to include the new column metadata. If you have a build script you could simply run it again after amending the schema to regenerate the map files.

    I could be more specific if you paste in your existing schema and description of the column you want to add.