From 0470e9ec539fc99fb9fb35f126e5e19d9cb617e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Wed, 10 Sep 2014 09:35:12 +0200 Subject: [PATCH] [api] fix first history entry detection in migration --- src/api/db/migrate/20140908125426_convert_request_history.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/db/migrate/20140908125426_convert_request_history.rb b/src/api/db/migrate/20140908125426_convert_request_history.rb index 965d87c426c..2edbfc884a0 100644 --- a/src/api/db/migrate/20140908125426_convert_request_history.rb +++ b/src/api/db/migrate/20140908125426_convert_request_history.rb @@ -33,7 +33,7 @@ def self.up history.create(p) if history end - s = OldHistory.find_by_sql "SELECT id,bs_request_id,state,comment,commenter,superseded_by,created_at FROM bs_request_histories ORDER BY bs_request_id ASC, state DESC" + s = OldHistory.find_by_sql "SELECT id,bs_request_id,state,comment,commenter,superseded_by,created_at FROM bs_request_histories ORDER BY bs_request_id ASC, created_at ASC" oldid=nil puts "Converting #{s.length} request history elements into new structure"