I’m curious about the procedure for updating schemas for custom models. As in how I update tables and stuff without touching the custom code I add to the class?
Is it enough to delete the map file and then rebuild the schema? Of course manually modifying the class code for any major table changes.
How about existing database tables/data? Is that something I need to alter manually, or does XPDO have something to help with this?
-
MODX Staff
- 10,725 Posts
The maps are always updated when you run xPDOGenerator::parseSchema(); you do not need to delete existing ones. Class files should be deleted if you need to regenerate them, but this should be a rare occurrence.
For now you’ll also have to modify the table manually (or run a script to make the proper alterations), but otherwise, regeneration of the map files is enough.