mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Apply syntax_tree formatting to db/*
This commit is contained in:
@@ -2,7 +2,11 @@
|
||||
|
||||
class FixTopicLikeCount < ActiveRecord::Migration[6.0]
|
||||
def up
|
||||
return if DB.query_single("SELECT * FROM site_settings WHERE name = 'enable_whispers' AND value = 't'").empty?
|
||||
if DB.query_single(
|
||||
"SELECT * FROM site_settings WHERE name = 'enable_whispers' AND value = 't'",
|
||||
).empty?
|
||||
return
|
||||
end
|
||||
|
||||
DB.exec(<<~SQL, whisper: Post.types[:whisper])
|
||||
UPDATE topics SET like_count = tbl.like_count
|
||||
|
||||
Reference in New Issue
Block a user