Multi-Content Revisions/Schema Migration

This page provides an overview of mappings from the old to the new schema.

Note that during the initial phase of the migration, the new tables are populated, but the old tables stay in use, and are not modified in any way. See also the migration plan.

Rows in the  table associate a revision row with any number of   rows. For migration from the old schema, there will always be only one  row, which must be inserted before inserting the corresponding   row.

Rows in the  table represent meta-data about individual content objects. A single  row can be re-used by multiple   rows, but for the initial import, we can assume that there is one slot per revision, and one content row per slot.

Name Tables
All name tables (, etc) are populated on demand: when looking up the id for a name during a write operation, and that ID is not found, a row for that name should be inserted. However, since the tables are small, their content can be cached in memory. Only when a name is not found in memory will it be necessary too check the database. The table must allow lookups in both directions. Both columns are unique. The id is auto-incrementing.

The mapping defined by the table may be cached aggressively. The mapping should update automatically when attempting to look up the id for an unknown name.