In Rails 7.1, using low_cardinality key in Migrations Throws an Error
ericbeland opened this issue · comments
HereC commented
In Rails 7.1, using low_cardinality in migrations throws an error. It looks like this should work per this spec.
Here is a reproduction:
class CreateUrls < ActiveRecord::Migration[7.1]
def change
create_table :urls, engine: 'MergeTree()', id: false do |t|
t.string :content_type, low_cardinality: true
t.string :url
end
end
end
== 20240430193419 CreateUrls: migrating =======================================
-- create_table(:urls, {:engine=>"MergeTree()", :id=>false})
rake aborted!
StandardError: An error has occurred, all later migrations canceled:
Caused by:
ArgumentError: Unknown key: :low_cardinality. Valid keys are: :limit, :precision, :scale, :default, :null, :collation, :comment, :primary_key, :if_exists, :if_not_exists
/Users/ebeland/.rvm/gems/ruby-3.1.0/gems/activesupport-7.1.3.2/lib/active_support/core_ext/hash/keys.rb:52:in `block in assert_valid_keys'
Sergey Odintsov commented
Now it not support. Will in the future.