diff options
author | Vitaly Takmazov | 2018-03-16 11:35:08 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-03-16 11:35:08 +0300 |
commit | 223e8ec7742855ac83da445c40656aea3bec7e9b (patch) | |
tree | eafe323999559ebe7e4492e665b458abcfe7fe6f /contrib/scripts/update_updated.sql | |
parent | 9ef168a03b75aeca0c2f7dda9ce87d4014c703a9 (diff) |
gradle: remove tests from root project
Diffstat (limited to 'contrib/scripts/update_updated.sql')
-rw-r--r-- | contrib/scripts/update_updated.sql | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/scripts/update_updated.sql b/contrib/scripts/update_updated.sql new file mode 100644 index 00000000..39b29210 --- /dev/null +++ b/contrib/scripts/update_updated.sql @@ -0,0 +1,2 @@ +UPDATE messages, (SELECT messages.`message_id` midd, MAX(COALESCE(replies.ts, messages.ts)) lastt FROM messages LEFT JOIN replies ON messages.`message_id`=replies.`message_id` GROUP BY messages.`message_id`) res +SET messages.updated = res.lastt WHERE messages.`message_id` = res.midd ;
\ No newline at end of file |