activerecord-cockroachdb-adapter icon indicating copy to clipboard operation
activerecord-cockroachdb-adapter copied to clipboard

collation definition with extension does not appear in the schema.rb

Open Piioo opened this issue 2 years ago • 1 comments

Hello,

when I add a collation with an extension to a migration it does not appear in the schema.rb. https://edgeguides.rubyonrails.org/active_record_migrations.html#column-modifiers

For example: add_column :careflex_employees, :last_name, :string, collation: 'de-u-ks-level2', then the migration works fine and the column is created with the correct collation, but we need it in the schema.rb too.

Piioo avatar Jul 17 '23 07:07 Piioo

I had a quick look at it, and indeed we do not have the adapter specific code to handle collation (e.g. SchemaDumper#schema_collation is not overriden).

This should not be so hard to implement, as we could follow pg way of handling it more or less. (as cockroachdb is doing)

BuonOmo avatar Jul 18 '23 21:07 BuonOmo