Add Ruby 3 support
Add Rails 6 support
Add Rails 5 support
- Fixed an issue where, if you installed another ActiveRecord-related gem installed that defined a method
primary_keys
on a model that returned an empty array,low_card_tables
would incorrectly behave as if the low-card table had no primary key at all, and expect you to includeid
in the all-columns index.
- The single-table inheritance type-discrimination column — by default called
type
— can now be part of a low-cardinality table itself. This elegantly allows you to use STI without consuming the very large amounts of space required by Rails' default implementation, where it stores the name of the class in every single row. - Fixed issues where you couldn't use
low_card_tables
with an ActiveRecord class that was at anything but the leaf of a single-table inheritance hierarchy. - Ensured that you can query a column containing a string or symbol with a query that's a string or a symbol, and it all works fine.
- Added support for
WHERE
clauses on a low-card table containing an array (.where(:my_low_card_column => [ :foo, :bar ])
). - Added support for ActiveRecord 4.2.x, and bumped versions on the CI configuration.
- Fixed an issue where, if a table that owned a low-card table was declared a namespace (e.g.,
module Foo; class Bar < ActiveRecord::Base; has_low_card_table :status; end; end
), the call tohas_low_card_table
would fail with an error (trying to call+
onnil
). - Bumped versions of Rails and JRuby we test against on Travis to the very latest.
- Fixed an issue where, if someone had defined an
ActiveRecord::Base
subclass with anil
table_name
, migrations would fail.
- Fixed an issue where you couldn't migrate a low-card column into existence with a migration — because if you declared a low-card column that didn't exist, you'd immediately receive an error. Now this works properly.