mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-02-19 00:33:17 +00:00
Merge tag 'v3.4.1'
This commit is contained in:
commit
8a732440ce
552 changed files with 2218 additions and 1100 deletions
|
|
@ -11,10 +11,11 @@
|
|||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# last_status_at :datetime
|
||||
# lock_version :integer default(0), not null
|
||||
#
|
||||
|
||||
class AccountStat < ApplicationRecord
|
||||
self.locking_column = nil
|
||||
|
||||
belongs_to :account, inverse_of: :account_stat
|
||||
|
||||
update_index('accounts#account', :account)
|
||||
|
|
|
|||
|
|
@ -49,7 +49,6 @@ module AccountCounters
|
|||
ON CONFLICT (account_id) DO UPDATE
|
||||
SET #{key} = account_stats.#{key} + :value,
|
||||
last_status_at = now(),
|
||||
lock_version = account_stats.lock_version + 1,
|
||||
updated_at = now()
|
||||
RETURNING id;
|
||||
SQL
|
||||
|
|
@ -59,7 +58,6 @@ module AccountCounters
|
|||
VALUES (:account_id, :default_value, now(), now())
|
||||
ON CONFLICT (account_id) DO UPDATE
|
||||
SET #{key} = account_stats.#{key} + :value,
|
||||
lock_version = account_stats.lock_version + 1,
|
||||
updated_at = now()
|
||||
RETURNING id;
|
||||
SQL
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue