mirror of
https://github.com/mautrix/whatsapp.git
synced 2025-03-14 14:15:38 +00:00
legacymigrate: ignore conflict when inserting empty ghost
This commit is contained in:
parent
efc33f0a6d
commit
a58f6a91c1
1 changed files with 3 additions and 1 deletions
|
@ -51,8 +51,10 @@ SELECT
|
|||
) -- metadata
|
||||
FROM puppet_old;
|
||||
|
||||
-- Some messages don't have senders, so insert an empty ghost to match the foreign key constraint.
|
||||
INSERT INTO ghost (bridge_id, id, name, avatar_id, avatar_hash, avatar_mxc, name_set, avatar_set, contact_info_set, is_bot, identifiers, metadata)
|
||||
VALUES ('', '', '', '', '', '', false, false, false, false, '[]', '{}');
|
||||
VALUES ('', '', '', '', '', '', false, false, false, false, '[]', '{}')
|
||||
ON CONFLICT (bridge_id, id) DO NOTHING;
|
||||
|
||||
INSERT INTO portal (
|
||||
bridge_id, id, receiver, mxid, parent_id, parent_receiver, relay_bridge_id, relay_login_id, other_user_id,
|
||||
|
|
Loading…
Add table
Reference in a new issue