Skip to content

Commit 6c170aa

Browse files
committed
Add quotes around index for SQLite
1 parent e25c783 commit 6c170aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mautrix/crypto/store/asyncpg/store.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,10 +358,10 @@ async def remove_outbound_group_sessions(self, rooms: list[RoomID]) -> None:
358358
await self.db.execute(q, self.account_id, *rooms)
359359

360360
_validate_message_index_query = """
361-
INSERT INTO crypto_message_index (sender_key, session_id, index, event_id, timestamp)
361+
INSERT INTO crypto_message_index (sender_key, session_id, "index", event_id, timestamp)
362362
VALUES ($1, $2, $3, $4, $5)
363363
-- have to update something so that RETURNING * always returns the row
364-
ON CONFLICT (sender_key, session_id, index) DO UPDATE SET sender_key=excluded.sender_key
364+
ON CONFLICT (sender_key, session_id, "index") DO UPDATE SET sender_key=excluded.sender_key
365365
RETURNING *
366366
"""
367367

0 commit comments

Comments
 (0)