Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Truncate schedule_stop_pairs #150

Merged
merged 1 commit into from
Sep 1, 2015
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ def self.truncate_database
current_routes,
current_routes_serving_stop,
current_stops,
current_schedule_stop_pairs,
old_schedule_stop_pairs,
feed_imports,
feeds,
old_operators,
Expand All @@ -32,13 +34,15 @@ def self.truncate_database
ALTER SEQUENCE current_routes_id_seq RESTART;
ALTER SEQUENCE current_routes_serving_stop_id_seq RESTART;
ALTER SEQUENCE current_stops_id_seq RESTART;
ALTER SEQUENCE current_schedule_stop_pairs_id_seq RESTART;
ALTER SEQUENCE feed_imports_id_seq RESTART;
ALTER SEQUENCE feeds_id_seq RESTART;
ALTER SEQUENCE old_operators_id_seq RESTART;
ALTER SEQUENCE old_operators_serving_stop_id_seq RESTART;
ALTER SEQUENCE old_routes_id_seq RESTART;
ALTER SEQUENCE old_routes_serving_stop_id_seq RESTART;
ALTER SEQUENCE old_stops_id_seq RESTART;
ALTER SEQUENCE old_schedule_stop_pairs_id_seq RESTART;
"
ActiveRecord::Base.connection.execute(sql)
end
Expand Down