summary refs log tree commit diff
path: root/scripts/nuke-room-from-db.sh
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-05-06 11:41:19 +0100
committerErik Johnston <erik@matrix.org>2015-05-06 11:41:19 +0100
commit119e5d7702a1de0b196a374b53b646c06ee753e5 (patch)
treea617bb7f11b100e1b6fdbb92c462109950d64908 /scripts/nuke-room-from-db.sh
parentMerge pull request #138 from matrix-org/erikj/SYN-371 (diff)
downloadsynapse-119e5d7702a1de0b196a374b53b646c06ee753e5.tar.xz
Seperate scripts/ into scripts/ and scripts-dev/, where scripts/* are automatically added to the package
Diffstat (limited to 'scripts/nuke-room-from-db.sh')
-rwxr-xr-xscripts/nuke-room-from-db.sh24
1 files changed, 0 insertions, 24 deletions
diff --git a/scripts/nuke-room-from-db.sh b/scripts/nuke-room-from-db.sh
deleted file mode 100755
index 58c036c896..0000000000
--- a/scripts/nuke-room-from-db.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/bash
-
-## CAUTION:
-## This script will remove (hopefully) all trace of the given room ID from
-## your homeserver.db
-
-## Do not run it lightly.
-
-ROOMID="$1"
-
-sqlite3 homeserver.db <<EOF
-DELETE FROM context_depth WHERE context = '$ROOMID';
-DELETE FROM current_state WHERE context = '$ROOMID';
-DELETE FROM feedback WHERE room_id = '$ROOMID';
-DELETE FROM messages WHERE room_id = '$ROOMID';
-DELETE FROM pdu_backward_extremities WHERE context = '$ROOMID';
-DELETE FROM pdu_edges WHERE context = '$ROOMID';
-DELETE FROM pdu_forward_extremities WHERE context = '$ROOMID';
-DELETE FROM pdus WHERE context = '$ROOMID';
-DELETE FROM room_data WHERE room_id = '$ROOMID';
-DELETE FROM room_memberships WHERE room_id = '$ROOMID';
-DELETE FROM rooms WHERE room_id = '$ROOMID';
-DELETE FROM state_pdus WHERE context = '$ROOMID';
-EOF