From e319dda17260334262603df9cdc18fe52d6c164b Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 12 Apr 2018 00:12:54 +0300 Subject: contrib: mark_all_read.sql --- contrib/scripts/mark_all_read.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 contrib/scripts/mark_all_read.sql (limited to 'contrib') 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 -- cgit v1.2.3