From 5db9b6cf76a5017eaec09ae583d3ddbd82259cf5 Mon Sep 17 00:00:00 2001 From: Manfred Stienstra Date: Fri, 1 May 2026 15:42:00 +0200 Subject: [PATCH 1/2] Update note about running tests. --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6cd2723..ba13411 100644 --- a/README.md +++ b/README.md @@ -51,5 +51,7 @@ Run tests in this repository with `rake`. Migrations are exercised by running th ``` cd test/dummy -rm -f db/schema.rb && RAILS_ENV=test rake db:drop db:create db:migrate +rm -f db/schema.rb && RAILS_ENV=test bundle exec rake db:drop db:create db:migrate +cd ../../ +bundle exec rake ``` From b3473790bff37db9c6d11e1d5809141725acbae6 Mon Sep 17 00:00:00 2001 From: Manfred Stienstra Date: Fri, 1 May 2026 15:51:05 +0200 Subject: [PATCH 2/2] Dump collations into schema before the tables. --- lib/active_record/collation/schema_dumper.rb | 4 ++-- test/dummy/db/schema.rb | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/active_record/collation/schema_dumper.rb b/lib/active_record/collation/schema_dumper.rb index 2ea0cac..086057a 100644 --- a/lib/active_record/collation/schema_dumper.rb +++ b/lib/active_record/collation/schema_dumper.rb @@ -10,15 +10,15 @@ def collations(stream) collations = @connection.collations return unless collations.any? - stream.puts collations.each do |row| stream.puts( " create_collation(#{row['collname'].inspect}, #{row['colllocale'].inspect})" ) end + stream.puts end - def trailer(stream) + def tables(stream) collations(stream) super end diff --git a/test/dummy/db/schema.rb b/test/dummy/db/schema.rb index 5046204..e3c5d98 100644 --- a/test/dummy/db/schema.rb +++ b/test/dummy/db/schema.rb @@ -14,10 +14,10 @@ # These are extensions that must be enabled in order to support this database enable_extension "pg_catalog.plpgsql" + create_collation("natural_de", "de-u-ka-shifted-kn-ks-level1-kv-symbol") + create_collation("natural_en", "en-u-ka-shifted-kn-ks-level1-kv-symbol") + create_table "clients", force: :cascade do |t| t.text "name", null: false end - - create_collation("natural_de", "de-u-ka-shifted-kn-ks-level1-kv-symbol") - create_collation("natural_en", "en-u-ka-shifted-kn-ks-level1-kv-symbol") end