diff options
author | Erik Johnston <erik@matrix.org> | 2015-02-12 11:42:43 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-02-12 11:42:43 +0000 |
commit | 1ed836cc2b909e0bcd439964173008e9755c4750 (patch) | |
tree | 65862dbcf81107332c0c7c65a2eda86eb6afc9ba /scripts/database-prepare-for-0.0.1.sh | |
parent | Merge pull request #59 from matrix-org/hotfixes-v0.6.1f (diff) | |
parent | Expand on caching (diff) | |
download | synapse-1ed836cc2b909e0bcd439964173008e9755c4750.tar.xz |
Merge branch 'release-v0.7.0' of github.com:matrix-org/synapse v0.7.0
Diffstat (limited to 'scripts/database-prepare-for-0.0.1.sh')
-rwxr-xr-x | scripts/database-prepare-for-0.0.1.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/database-prepare-for-0.0.1.sh b/scripts/database-prepare-for-0.0.1.sh new file mode 100755 index 0000000000..43d759a5cd --- /dev/null +++ b/scripts/database-prepare-for-0.0.1.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# This is will prepare a synapse database for running with v0.0.1 of synapse. +# It will store all the user information, but will *delete* all messages and +# room data. + +set -e + +cp "$1" "$1.bak" + +DUMP=$(sqlite3 "$1" << 'EOF' +.dump users +.dump access_tokens +.dump presence +.dump profiles +EOF +) + +rm "$1" + +sqlite3 "$1" <<< "$DUMP" |