@@ -385,6 +385,7 @@ static MIGRATIONS: &[Migration] = &[
385385 alter table pstat_series_new rename to pstat_series;
386386 "# ,
387387 ) ,
388+ Migration :: new ( "alter table pull_request_build add column backends text" ) ,
388389] ;
389390
390391#[ async_trait:: async_trait]
@@ -909,13 +910,14 @@ impl Connection for SqliteConnection {
909910 include : Option < & str > ,
910911 exclude : Option < & str > ,
911912 runs : Option < i32 > ,
913+ backends : Option < & str > ,
912914 ) {
913915 self . raw_ref ( )
914916 . prepare_cached (
915- "insert into pull_request_build (pr, complete, requested, include, exclude, runs) VALUES (?, 0, strftime('%s','now'), ?, ?, ?)" ,
917+ "insert into pull_request_build (pr, complete, requested, include, exclude, runs, backends ) VALUES (?, 0, strftime('%s','now'), ? , ?, ?, ?)" ,
916918 )
917919 . unwrap ( )
918- . execute ( params ! [ pr, include, exclude, & runs] )
920+ . execute ( params ! [ pr, include, exclude, & runs, backends ] )
919921 . unwrap ( ) ;
920922 }
921923 async fn pr_attach_commit (
@@ -939,7 +941,7 @@ impl Connection for SqliteConnection {
939941 async fn queued_commits ( & self ) -> Vec < QueuedCommit > {
940942 self . raw_ref ( )
941943 . prepare_cached (
942- "select pr, bors_sha, parent_sha, include, exclude, runs, commit_date from pull_request_build
944+ "select pr, bors_sha, parent_sha, include, exclude, runs, commit_date, backends from pull_request_build
943945 where complete is false and bors_sha is not null
944946 order by requested asc" ,
945947 )
@@ -954,7 +956,8 @@ impl Connection for SqliteConnection {
954956 include : row. get ( 3 ) . unwrap ( ) ,
955957 exclude : row. get ( 4 ) . unwrap ( ) ,
956958 runs : row. get ( 5 ) . unwrap ( ) ,
957- commit_date : row. get :: < _ , Option < i64 > > ( 6 ) . unwrap ( ) . map ( |timestamp| Date ( DateTime :: from_timestamp ( timestamp, 0 ) . unwrap ( ) ) )
959+ commit_date : row. get :: < _ , Option < i64 > > ( 6 ) . unwrap ( ) . map ( |timestamp| Date ( DateTime :: from_timestamp ( timestamp, 0 ) . unwrap ( ) ) ) ,
960+ backends : row. get ( 7 ) . unwrap ( ) ,
958961 } )
959962 } )
960963 . collect :: < Result < Vec < _ > , _ > > ( )
@@ -974,7 +977,7 @@ impl Connection for SqliteConnection {
974977 assert_eq ! ( count, 1 , "sha is unique column" ) ;
975978 self . raw_ref ( )
976979 . query_row (
977- "select pr, sha, parent_sha, include, exclude, runs, commit_date from pull_request_build
980+ "select pr, sha, parent_sha, include, exclude, runs, commit_date, backends from pull_request_build
978981 where sha = ?" ,
979982 params ! [ sha] ,
980983 |row| {
@@ -985,7 +988,8 @@ impl Connection for SqliteConnection {
985988 include : row. get ( 3 ) . unwrap ( ) ,
986989 exclude : row. get ( 4 ) . unwrap ( ) ,
987990 runs : row. get ( 5 ) . unwrap ( ) ,
988- commit_date : row. get :: < _ , Option < i64 > > ( 6 ) . unwrap ( ) . map ( |timestamp| Date ( DateTime :: from_timestamp ( timestamp, 0 ) . unwrap ( ) ) )
991+ commit_date : row. get :: < _ , Option < i64 > > ( 6 ) . unwrap ( ) . map ( |timestamp| Date ( DateTime :: from_timestamp ( timestamp, 0 ) . unwrap ( ) ) ) ,
992+ backends : row. get ( 7 ) . unwrap ( ) ,
989993 } )
990994 } ,
991995 )
0 commit comments