aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-04-12 00:12:54 +0300
committerGravatar Vitaly Takmazov2018-04-12 00:12:54 +0300
commite319dda17260334262603df9cdc18fe52d6c164b (patch)
tree5b7546c3f177e9d7e9d88d6db80df6f25ed2a096
parent495ee60b34991572c06732674c6e02f290cdbd55 (diff)
contrib: mark_all_read.sql
-rw-r--r--contrib/scripts/mark_all_read.sql1
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/scripts/mark_all_read.sql b/contrib/scripts/mark_all_read.sql
new file mode 100644
index 00000000..5a887c4e
--- /dev/null
+++ b/contrib/scripts/mark_all_read.sql
@@ -0,0 +1 @@
+update subscr_messages, (select m.message_id midd, m.replies from messages m inner join subscr_messages s on m.message_id=s.message_id) r set subscr_messages.last_read_rid=r.replies where subscr_messages.message_id=r.midd; \ No newline at end of file