diff options
author | Erik Johnston <erik@matrix.org> | 2015-01-23 15:51:48 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-01-23 15:51:48 +0000 |
commit | 9b1e552b5163aad84a3ae4fd70116d3e782fb443 (patch) | |
tree | 19d827838d10688da26e3fa5503c63b71fd34db0 /scripts/database-prepare-for-0.0.1.sh | |
parent | Add storage method have_events (diff) | |
parent | Update .gitignore (diff) | |
download | synapse-9b1e552b5163aad84a3ae4fd70116d3e782fb443.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into rejections
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" |