mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-29 07:41:20 +00:00
fmt
This commit is contained in:
parent
94e545fe52
commit
a27cf8920b
3 changed files with 16 additions and 23 deletions
|
@ -1,5 +1,2 @@
|
||||||
# Keep normal formatting between `BEGIN` and `COMMIT` statements
|
# Keep normal formatting between `BEGIN` and `COMMIT` statements
|
||||||
nogrouping=1
|
nogrouping=1
|
||||||
|
|
||||||
# Don't add whitespace around % (used for `format`) in dollar-quoted function body
|
|
||||||
placeholder=[a-zA-Z0-9_\\.]*%[a-zA-Z0-9_\\.]*
|
|
||||||
|
|
|
@ -32,8 +32,8 @@ FROM (
|
||||||
post
|
post
|
||||||
WHERE
|
WHERE
|
||||||
post.id = comment.post_id
|
post.id = comment.post_id
|
||||||
AND (post.deleted OR post.removed)
|
AND (post.deleted
|
||||||
))
|
OR post.removed)))
|
||||||
GROUP BY
|
GROUP BY
|
||||||
community.id) AS counted
|
community.id) AS counted
|
||||||
WHERE
|
WHERE
|
||||||
|
|
|
@ -86,15 +86,11 @@ BEGIN
|
||||||
UPDATE
|
UPDATE
|
||||||
thing_report
|
thing_report
|
||||||
SET
|
SET
|
||||||
resolved = TRUE, resolver_id = first_removal.mod_person_id, updated = first_removal.when_
|
resolved = TRUE, resolver_id = first_removal.mod_person_id, updated = first_removal.when_ FROM (
|
||||||
FROM ( SELECT
|
SELECT
|
||||||
thing_id,
|
thing_id, min(when_) AS when_ FROM new_removal
|
||||||
min(when_) AS when_
|
|
||||||
FROM new_removal
|
|
||||||
WHERE
|
WHERE
|
||||||
new_removal.removed
|
new_removal.removed GROUP BY thing_id) AS first_removal
|
||||||
GROUP BY
|
|
||||||
thing_id) AS first_removal
|
|
||||||
WHERE
|
WHERE
|
||||||
report.thing_id = first_removal.thing_id
|
report.thing_id = first_removal.thing_id
|
||||||
AND NOT report.resolved
|
AND NOT report.resolved
|
||||||
|
|
Loading…
Reference in a new issue