Skip to content

Rails type_for_column no longer takes a connection. #279

Description

@lomefin

ActiveModel::Attribute.from_database(column.name, column.default, type_for_column(nil_connection, column))

Here we are setting a nil_connection but now rails no longer accepts a connection.
This will break the upgrade path.

ArgumentError: wrong number of arguments (given 2, expected 1)
    /Users/lluarte/.local/share/mise/installs/ruby/3.4.7/lib/ruby/gems/3.4.0/bundler/gems/rails-76fcc3a31daf/activerecord/lib/active_record/attributes.rb:311:in 'type_for_column'
    /Users/lluarte/.local/share/mise/installs/ruby/3.4.7/lib/ruby/gems/3.4.0/bundler/gems/activerecord-tenanted-855379f55d79/lib/active_record/tenanted/patches.rb:38:in 'block in ActiveRecord::Tenanted::Patches::Attributes::ClassMethods#_default_attributes'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions