diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2021-06-11 14:45:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-11 14:45:53 +0100 |
commit | c1b9922498dea4b2882d26a4eaef3e0a37e727fd (patch) | |
tree | 926ab9057e6276f7f11fb0b00d4107836b9484dd /synapse/storage/schema/README.md | |
parent | Use the matching complement branch when running tests in CI. (#10160) (diff) | |
download | synapse-c1b9922498dea4b2882d26a4eaef3e0a37e727fd.tar.xz |
Support for database schema version ranges (#9933)
This is essentially an implementation of the proposal made at https://hackmd.io/@richvdh/BJYXQMQHO, though the details have ended up looking slightly different.
Diffstat (limited to 'synapse/storage/schema/README.md')
-rw-r--r-- | synapse/storage/schema/README.md | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/synapse/storage/schema/README.md b/synapse/storage/schema/README.md index 030153db64..729f44ea6c 100644 --- a/synapse/storage/schema/README.md +++ b/synapse/storage/schema/README.md @@ -1,37 +1,4 @@ # Synapse Database Schemas -This directory contains the schema files used to build Synapse databases. - -Synapse supports splitting its datastore across multiple physical databases (which can -be useful for large installations), and the schema files are therefore split according -to the logical database they are apply to. - -At the time of writing, the following "logical" databases are supported: - -* `state` - used to store Matrix room state (more specifically, `state_groups`, - their relationships and contents.) -* `main` - stores everything else. - -Addionally, the `common` directory contains schema files for tables which must be -present on *all* physical databases. - -## Full schema dumps - -In the `full_schemas` directories, only the most recently-numbered snapshot is useful -(`54` at the time of writing). Older snapshots (eg, `16`) are present for historical -reference only. - -## Building full schema dumps - -If you want to recreate these schemas, they need to be made from a database that -has had all background updates run. - -To do so, use `scripts-dev/make_full_schema.sh`. This will produce new -`full.sql.postgres` and `full.sql.sqlite` files. - -Ensure postgres is installed, then run: - - ./scripts-dev/make_full_schema.sh -p postgres_username -o output_dir/ - -NB at the time of writing, this script predates the split into separate `state`/`main` -databases so will require updates to handle that correctly. +This directory contains the schema files used to build Synapse databases. For more +information, see /docs/development/database_schema.md. |