diff --git a/roomserver/storage/postgres/user_room_keys_table.go b/roomserver/storage/postgres/user_room_keys_table.go index 1f0943c9a..15b1bff63 100644 --- a/roomserver/storage/postgres/user_room_keys_table.go +++ b/roomserver/storage/postgres/user_room_keys_table.go @@ -26,7 +26,7 @@ import ( ) const userRoomKeysSchema = ` -CREATE TABLE roomserver_user_room_keys ( +CREATE TABLE IF NOT EXISTS roomserver_user_room_keys ( user_nid INTEGER NOT NULL, room_nid INTEGER NOT NULL, pseudo_id_key BYTEA NOT NULL, diff --git a/roomserver/storage/sqlite3/user_room_keys_table.go b/roomserver/storage/sqlite3/user_room_keys_table.go index 72452f9f3..db83010bb 100644 --- a/roomserver/storage/sqlite3/user_room_keys_table.go +++ b/roomserver/storage/sqlite3/user_room_keys_table.go @@ -26,7 +26,7 @@ import ( ) const userRoomKeysSchema = ` -CREATE TABLE roomserver_user_room_keys ( +CREATE TABLE IF NOT EXISTS roomserver_user_room_keys ( user_nid INTEGER NOT NULL, room_nid INTEGER NOT NULL, pseudo_id_key TEXT NOT NULL,