mirror of
https://mau.dev/mautrix/go.git
synced 2026-03-14 14:25:53 +01:00
hicli/database: fix edit triggers
This commit is contained in:
parent
6f1c516baa
commit
67b1c97f14
1 changed files with 2 additions and 2 deletions
|
|
@ -121,7 +121,7 @@ BEGIN
|
|||
WHERE event_id = NEW.relates_to
|
||||
AND last_edit_rowid = NEW.rowid
|
||||
AND state_key IS NULL
|
||||
AND relation_type NOT IN ('m.replace', 'm.annotation');
|
||||
AND (relation_type IS NULL OR relation_type NOT IN ('m.replace', 'm.annotation'));
|
||||
END;
|
||||
|
||||
CREATE TRIGGER event_insert_update_last_edit
|
||||
|
|
@ -137,7 +137,7 @@ BEGIN
|
|||
AND type = NEW.type
|
||||
AND sender = NEW.sender
|
||||
AND state_key IS NULL
|
||||
AND relation_type NOT IN ('m.replace', 'm.annotation')
|
||||
AND (relation_type IS NULL OR relation_type NOT IN ('m.replace', 'm.annotation'))
|
||||
AND NEW.timestamp >
|
||||
COALESCE((SELECT prev_edit.timestamp FROM event prev_edit WHERE prev_edit.rowid = event.last_edit_rowid), 0);
|
||||
END;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue