Remove: #611 グループシステム関係のカラムを複数削除 (#618)

This commit is contained in:
KMY(雪あすか) 2024-02-27 13:08:30 +09:00 committed by GitHub
parent 0767212284
commit aec832e257
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 29 additions and 97 deletions

View file

@ -50,7 +50,6 @@
# trendable :boolean
# reviewed_at :datetime
# requested_review_at :datetime
# group_allow_private_message :boolean
# searchability :integer default("direct"), not null
# settings :jsonb
# indexable :boolean default(FALSE), not null

View file

@ -4,15 +4,14 @@
#
# Table name: account_stats
#
# id :bigint(8) not null, primary key
# account_id :bigint(8) not null
# statuses_count :bigint(8) default(0), not null
# following_count :bigint(8) default(0), not null
# followers_count :bigint(8) default(0), not null
# created_at :datetime not null
# updated_at :datetime not null
# last_status_at :datetime
# group_activitypub_count :integer
# id :bigint(8) not null, primary key
# account_id :bigint(8) not null
# statuses_count :bigint(8) default(0), not null
# following_count :bigint(8) default(0), not null
# followers_count :bigint(8) default(0), not null
# created_at :datetime not null
# updated_at :datetime not null
# last_status_at :datetime
#
class AccountStat < ApplicationRecord
@ -34,8 +33,4 @@ class AccountStat < ApplicationRecord
def statuses_count
[attributes['statuses_count'], 0].max
end
def group_activitypub_count
[attributes['group_activitypub_count'] || 0, 0].max
end
end

View file

@ -16,8 +16,6 @@ module Account::Counters
:following_count=,
:followers_count,
:followers_count=,
:group_activitypub_count,
:group_activitypub_count=,
:last_status_at,
to: :account_stat

View file

@ -29,8 +29,8 @@
# status_poll_state :integer default("optional"), not null
# status_quote_state :integer default("optional"), not null
# status_reply_state :integer default("optional"), not null
# status_mention_state :integer default(0), not null
# status_reference_state :integer default(0), not null
# status_mention_state :integer default("optional"), not null
# status_reference_state :integer default("optional"), not null
# status_tag_threshold :integer default(-1), not null
# status_media_threshold :integer default(-1), not null
# status_poll_threshold :integer default(-1), not null