First stab at a SQL schema for persisting the shared data model
- A lot of stuff has been shunted into
JSONB
columns for now - Column names have been converted to snake_case to avoid potential bugs caused by Postgres automatic conversion of unquoted camelCase identifiers to lower case
-
meta
sub objects are flattened to dotted.paths - Null constraints need some more attention
- The implementation of manuscript versions uses a linked list of
previous_version
. The whole list can be queried with a recursive CTE. Alternative suggestions welcome.