We're going to use backward extremities to represent "gaps" in our algorithm. (Specifically, a "gap" is represented by a set of backward extremities which all appear at the same point in the stitched ordering). Accordingly, we need to assign them a stitched ordering. We're going to do this indirectly, by referencing the event that appears before it in the stitched ordering, so that there is only one table that has a stitched ordering column.
Synapse Database Schemas
This directory contains the schema files used to build Synapse databases. For more information, see https://element-hq.github.io/synapse/develop/development/database_schema.html.