Skip to content

Commit

Permalink
Add indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenyeargin committed Aug 19, 2023
1 parent a51c80e commit d8666b7
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
17 changes: 17 additions & 0 deletions db/migrate/20230819161345_add_indexes.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# frozen_string_literal: true

##
# Create Trips
class AddIndexes < ActiveRecord::Migration[7.0]
def change
add_index :trips, ['shape_id'], name: 'index_trips_on_shape_id'
add_index :trips, ['calendar_id'], name: 'index_stop_times_on_service_id'
add_index :trips, ['route_id'], name: 'index_stop_times_on_route_id'
add_index :trips, ['shape_gid'], name: 'index_trips_on_shape_gid'
add_index :trips, ['block_gid'], name: 'index_trips_on_block_gid'
add_index :trips, ['service_gid'], name: 'index_stop_times_on_service_gid'
add_index :trips, ['route_gid'], name: 'index_stop_times_on_route_gid'
add_index :stop_times, ['stop_id'], name: 'index_stop_times_on_stop_id'
add_index :stop_times, ['stop_gid'], name: 'index_stop_times_on_stop_gid'
end
end
11 changes: 10 additions & 1 deletion db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d8666b7

Please sign in to comment.