DEV: Apply syntax_tree formatting to db/*

This commit is contained in:
David Taylor
2023-01-09 11:59:41 +00:00
parent cb932d6ee1
commit b0fda61a8e
467 changed files with 1682 additions and 1624 deletions

View File

@@ -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