Merge remote-tracking branch 'parent/main' into kb_migration

This commit is contained in:
KMY 2023-08-07 22:10:24 +09:00
commit ce3cf82f8f
175 changed files with 1951 additions and 826 deletions

View file

@ -5,7 +5,7 @@ class ApplicationRecord < ActiveRecord::Base
include Remotable
connects_to database: { writing: :primary, reading: ENV['DB_REPLICA_NAME'] || ENV['READ_DATABASE_URL'] ? :read : :primary }
connects_to database: { writing: :primary, reading: ENV['DB_REPLICA_NAME'] || ENV['REPLICA_DATABASE_URL'] ? :replica : :primary }
class << self
def update_index(_type_name, *_args, &_block)

View file

@ -31,6 +31,7 @@
# trendable :boolean
# link_type :integer
# published_at :datetime
# image_description :string default(""), not null
#
class PreviewCard < ApplicationRecord

View file

@ -177,7 +177,7 @@ class Status < ApplicationRecord
REAL_TIME_WINDOW = 6.hours
def cache_key
"v2:#{super}"
"v3:#{super}"
end
def searchable_by(preloaded = nil)