Defining a Schema
Last updated Dec 21st, 2019 | Page history | Improve this page | Report an issue
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$306 per month—let's make that $500!
Learn moreWhat is a Schema?¶
xPDO generates its map and class files, which power the database relationships, from XML schema files. An XML schema is based on a package that defines the name of the schema and allows xPDO to load the schema with its classes dynamically at any time using xPDO.addPackage.
Schema Version¶
Please note that the default schema version changed in xPDO 2.0.0-rc3 to version 1.1. If you created your model in releases before 2.0.0-rc3, and you want to use the new index elements for describing your indexes, you can migrate to the new schema format by using the upgrade tool included with xPDO. See Upgrading Models to Schema Version 1.1 for more information.
- Defining the Database and Tables
- Upgrading Models to Schema Version 1.1
- Defining Relationships
- More Examples of xPDO XML Schema Files
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$306 per month—let's make that $500!
Learn more