Merge remote-tracking branch 'parent/main' into kb_migration
This commit is contained in:
commit
ce3cf82f8f
175 changed files with 1951 additions and 826 deletions
|
@ -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)
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
# trendable :boolean
|
||||
# link_type :integer
|
||||
# published_at :datetime
|
||||
# image_description :string default(""), not null
|
||||
#
|
||||
|
||||
class PreviewCard < ApplicationRecord
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue