summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-03-23 14:15:32 +0000
committerErik Johnston <erik@matrix.org>2016-03-23 14:15:32 +0000
commitb2757655455fb2bf485c66affeb5a294eb9459c2 (patch)
treea75440a476c09916a1cf4ab1ed59250af220d4f1 /synapse/storage
parentSQLite and postgres doesn't share a true literal (diff)
downloadsynapse-b2757655455fb2bf485c66affeb5a294eb9459c2.tar.xz
Comment about weird SQL
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/schema/delta/30/public_rooms.sql4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/storage/schema/delta/30/public_rooms.sql b/synapse/storage/schema/delta/30/public_rooms.sql
index 3400898ed0..f09db4faa6 100644
--- a/synapse/storage/schema/delta/30/public_rooms.sql
+++ b/synapse/storage/schema/delta/30/public_rooms.sql
@@ -15,7 +15,9 @@
 
 
 /* This release removes the restriction that published rooms must have an alias,
- * so we go back and ensure the only 'public' rooms are ones with an alias.*/
+ * so we go back and ensure the only 'public' rooms are ones with an alias.
+ * We use (1 = 0) and (1 = 1) so that it works in both postgres and sqlite
+ */
 UPDATE rooms SET is_public = (1 = 0) WHERE is_public = (1 = 1) AND room_id not in (
     SELECT room_id FROM room_aliases
 );