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;