Skip to content

Commit

Permalink
add in sort example
Browse files Browse the repository at this point in the history
  • Loading branch information
jarredhawkins committed Aug 15, 2024
1 parent a8c4faa commit 949f7a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion acceptance/cases/migration/schema_dumper_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def test_dump_schema_index_storing
connection = ActiveRecord::Base.connection
schema = StringIO.new
ActiveRecord::SchemaDumper.dump connection, schema
assert schema.string.include?("t.index [\"last_name\"], name: \"index_singers_on_last_name\", order: { last_name: :asc }, storing: [\"tracks_count\"]"), schema.string
assert schema.string.include?("t.index [\"last_name\"], name: \"index_singers_on_last_name\", order: { last_name: :asc }, storing: [\"first_name\", \"tracks_count\"]"), schema.string
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion acceptance/schema/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def create_tables_in_test_schema
t.integer :lock_version
t.virtual :full_name, type: :string, as: "COALESCE(first_name || ' ', '') || last_name", stored: true
end
add_index :singers, :last_name, storing: %i[tracks_count]
add_index :singers, :last_name, storing: %i[tracks_count first_name]

if is_7_1_or_higher?
create_table :albums, primary_key: [:singerid, :albumid] do |t|
Expand Down

0 comments on commit 949f7a2

Please sign in to comment.