PNixx / clickhouse-activerecord

A Ruby database ActiveRecord driver for ClickHouse

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Rails7] running rails_7 branch ruby 2.7.6 rails 7.1

TemaMix opened this issue · comments

I faced with issue when try to use the gem for rails 7.

 NameError: undefined local variable or method `final' for #<ClickhouseActiverecord::SchemaMigration:0x00007fcbccc9da98>`
 gems/clickhouse-activerecord-02c7bb78e1ab/lib/clickhouse-activerecord/migration.rb:29:in `all_versions'

I reworked the method all_versions like that:

    def all_versions
      table = arel_table.dup
      table.final = true
      sm = Arel::SelectManager.new(table)
      sm.project(arel_table[primary_key])
      sm.order(arel_table[primary_key].asc)

      connection.select_values(sm, "#{self.class} Load")
    end

I hope it will help you.

fixed in v1.0.0