Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
4 changes: 2 additions & 2 deletions lib/active_record/collation/schema_dumper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions test/dummy/db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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