synapse-product/synapse/storage/schema/full_schemas
2019-06-04 01:06:00 +10:00
..
16 Remove unused server_tls_certificates functions (#5028) 2019-04-08 21:50:18 +01:00
54 add stuff in bg updates 2019-06-04 01:06:00 +10:00
README.txt fix schemas 2019-06-03 22:23:40 +10:00

Building full schema dumps
==========================

Postgres
--------

$ pg_dump --format=plain --schema-only --no-tablespaces --no-acl --no-owner $DATABASE_NAME| sed -e '/^--/d' -e 's/public\.//g' -e '/^SET /d' -e '/^SELECT /d' > full.sql.postgres

SQLite
------

$ sqlite3 $DATABASE_FILE ".schema" > full.sql.sqlite

Delete the CREATE statements for "sqlite_stat1", "schema_version", "applied_schema_deltas", and "applied_module_schemas".