From 3566abd9bcef7c8ea848289dc2aa66b3e2f4f61e Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Tue, 13 Aug 2024 15:14:48 -0500 Subject: [PATCH] Fix boolean schema for Postgres --- .../schema/main/delta/87/01_sliding_sync_memberships.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/synapse/storage/schema/main/delta/87/01_sliding_sync_memberships.sql b/synapse/storage/schema/main/delta/87/01_sliding_sync_memberships.sql index eb31cc7aff..2ad316e8e4 100644 --- a/synapse/storage/schema/main/delta/87/01_sliding_sync_memberships.sql +++ b/synapse/storage/schema/main/delta/87/01_sliding_sync_memberships.sql @@ -31,7 +31,7 @@ CREATE TABLE IF NOT EXISTS sliding_sync_joined_rooms( -- `m.room.name` -> `content.name` (current state) room_name TEXT, -- `m.room.encryption` -> `content.algorithm` (current state) - is_encrypted BOOLEAN DEFAULT 0 NOT NULL, + is_encrypted BOOLEAN DEFAULT FALSE NOT NULL, -- FIXME: Maybe we want to add `tombstone_successor_room_id` here to help with `include_old_rooms` -- (tracked by https://github.com/element-hq/synapse/issues/17540) PRIMARY KEY (room_id) @@ -68,7 +68,7 @@ CREATE TABLE IF NOT EXISTS sliding_sync_membership_snapshots( -- able to distinguish between a room with `None` as valid value for some state and -- room where the state is completely unknown. Basically, this should be True unless -- no stripped state was provided for a remote invite/knock (False). - has_known_state BOOLEAN DEFAULT 0 NOT NULL, + has_known_state BOOLEAN DEFAULT FALSE NOT NULL, -- `m.room.create` -> `content.type` (according to the current state at the time of -- the membership) room_type TEXT, @@ -77,7 +77,7 @@ CREATE TABLE IF NOT EXISTS sliding_sync_membership_snapshots( room_name TEXT, -- `m.room.encryption` -> `content.algorithm` (according to the current state at the -- time of the membership) - is_encrypted BOOLEAN DEFAULT 0 NOT NULL, + is_encrypted BOOLEAN DEFAULT FALSE NOT NULL, -- FIXME: Maybe we want to add `tombstone_successor_room_id` here to help with `include_old_rooms` -- (tracked by https://github.com/element-hq/synapse/issues/17540) PRIMARY KEY (room_id, user_id)