Problem
Rails 8.1 deprecated AbstractAdapter#check_if_write_query() method, which breaks compatibility of this library.
The original method code is this:
def check_if_write_query(sql)
return unless preventing_writes? && write_query?(sql)
raise ActiveRecord::ReadOnlyError, "Write query attempted while in readonly mode: #{sql}"
end
You can reimplement the same method for the 8.0-related adapter, but only if it doesn't exist yet in the runtime from the AbstractAdapter.