@@ -218,8 +218,8 @@ struct Error;
218218
219219#[ derive( Serialize ) ]
220220struct ErrorRow < ' a > {
221- benchmark : & ' a str ,
222221 aid : i32 ,
222+ benchmark : & ' a str ,
223223 error : Nullable < & ' a str > ,
224224}
225225
@@ -229,7 +229,7 @@ impl Table for Error {
229229 }
230230
231231 fn sqlite_attributes ( ) -> & ' static str {
232- "benchmark, aid , error"
232+ "aid, benchmark , error"
233233 }
234234
235235 fn postgres_generated_id_attribute ( ) -> Option < & ' static str > {
@@ -239,8 +239,8 @@ impl Table for Error {
239239 fn write_postgres_csv_row < W : Write > ( writer : & mut csv:: Writer < W > , row : & rusqlite:: Row ) {
240240 writer
241241 . serialize ( ErrorRow {
242- benchmark : row. get_ref ( 0 ) . unwrap ( ) . as_str ( ) . unwrap ( ) ,
243- aid : row. get ( 1 ) . unwrap ( ) ,
242+ aid : row. get ( 0 ) . unwrap ( ) ,
243+ benchmark : row. get_ref ( 1 ) . unwrap ( ) . as_str ( ) . unwrap ( ) ,
244244 error : row. get_ref ( 2 ) . unwrap ( ) . try_into ( ) . unwrap ( ) ,
245245 } )
246246 . unwrap ( ) ;
@@ -333,6 +333,7 @@ struct PullRequestBuildRow<'a> {
333333 include : Nullable < & ' a str > ,
334334 exclude : Nullable < & ' a str > ,
335335 runs : Nullable < i32 > ,
336+ commit_date : Nullable < DateTime < Utc > > ,
336337}
337338
338339impl Table for PullRequestBuild {
@@ -341,7 +342,7 @@ impl Table for PullRequestBuild {
341342 }
342343
343344 fn sqlite_attributes ( ) -> & ' static str {
344- "bors_sha, pr, parent_sha, complete, requested, include, exclude, runs"
345+ "bors_sha, pr, parent_sha, complete, requested, include, exclude, runs, commit_date "
345346 }
346347
347348 fn postgres_generated_id_attribute ( ) -> Option < & ' static str > {
@@ -350,6 +351,7 @@ impl Table for PullRequestBuild {
350351
351352 fn write_postgres_csv_row < W : Write > ( writer : & mut csv:: Writer < W > , row : & rusqlite:: Row ) {
352353 let requested: Option < i64 > = row. get ( 4 ) . unwrap ( ) ;
354+ let commit_date: Option < i64 > = row. get ( 8 ) . unwrap ( ) ;
353355
354356 writer
355357 . serialize ( PullRequestBuildRow {
@@ -363,6 +365,9 @@ impl Table for PullRequestBuild {
363365 include : row. get_ref ( 5 ) . unwrap ( ) . try_into ( ) . unwrap ( ) ,
364366 exclude : row. get_ref ( 6 ) . unwrap ( ) . try_into ( ) . unwrap ( ) ,
365367 runs : row. get ( 7 ) . unwrap ( ) ,
368+ commit_date : Nullable (
369+ commit_date. map ( |seconds| Utc . timestamp_opt ( seconds, 0 ) . unwrap ( ) ) ,
370+ ) ,
366371 } )
367372 . unwrap ( ) ;
368373 }
0 commit comments