From 92f3362c5cab640ec498ab97f039ded54b4d287d Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sat, 30 Dec 2023 21:40:30 +0100 Subject: [PATCH] Fix mistakes in sqlite upgrade --- database/upgrades/17-refactor-sqlite.sql | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/database/upgrades/17-refactor-sqlite.sql b/database/upgrades/17-refactor-sqlite.sql index 1e736fe2..78f62eb2 100644 --- a/database/upgrades/17-refactor-sqlite.sql +++ b/database/upgrades/17-refactor-sqlite.sql @@ -52,10 +52,10 @@ INSERT INTO message_new SELECT sender, CASE WHEN timestamp > 1500000000000000 THEN timestamp / 1000 ELSE timestamp END, CASE WHEN timestamp > 1500000000000000 THEN timestamp % 1000 ELSE 0 END, - mxid, - mx_room, COALESCE(signal_chat_id, ''), - COALESCE(signal_receiver, '') + COALESCE(signal_receiver, ''), + mxid, + mx_room FROM message; INSERT INTO reaction_new @@ -64,10 +64,10 @@ SELECT msg_author, 0, -- _part_index author, emoji, - mxid, - mx_room, COALESCE(signal_chat_id, ''), - COALESCE(signal_receiver, '') + COALESCE(signal_receiver, ''), + mxid, + mx_room FROM reaction; DROP TABLE message; @@ -164,7 +164,7 @@ CREATE TABLE user_new ( ); INSERT INTO user_new - SELECT mxid, uuid, phone, management_room + SELECT mxid, uuid, username, management_room FROM user; DROP TABLE user; ALTER TABLE user_new RENAME TO user;