With the move to MgdSchema for MidCOM 2.6, there is now the possibility to introduce new core tables / classes into the system. These days I have started to utilize this possibility for both ease of use and performance. To make this work, you need to observe a few things since the MgdSchema core is not fully stabilized yet.
Two steps need to be done here: The database update and the inclusion of the new schema definitions:
The distribution now includes an SQL script that can be found at /lib/midcom/config/mgdschema/sql/midcom_dbobjects_full.sql. You need to execute that file for each database you are using MidCOM CVS Head as of 2005-07-15 with. At this time, this script will create a single table, but more may be added at a later time. As long as you follow MidCOM CVS closely, you need to watch that file for changes and updates and integrate them manually.
Inclusion of the new Schema Definitions
MidCOM now ships with a MgdSchema object definition XML file that can be found at /lib/midcom/config/mgdschema/midcom_dbobjects.xml. Due to several bugs in the MgdSchema core, you neet to follow a few guidelines here right now:
- In the Midgard Share directory (usually $installation_prefix/share/) where the file MgdObjects.xml is located, create a subdirectory schema.
- You need to copy or symlink the schema definition into that directory.
- Add a line like MidgardSchema "/usr/local/share/midgard/schema/merged.xml" to your Apache configuration
- Restart Apache
- In case you have OpenPSA 2 installed, be aware that it is not possible to include more then one schema definition file at this time. Instead, you have to manually merge all files, and copy that file only into the schema directory and add it accordingly. You must not have other files in that directory, otherwise Apache will segfault for good.