From 79807ca16c98c5f75e08624a514ba2afe585373a Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 25 May 2018 18:43:38 -0700 Subject: index for contribs --- rust/src/api_server.rs | 11 ++++------- rust/src/database_models.rs | 4 ++-- rust/src/database_schema.rs | 3 ++- 3 files changed, 8 insertions(+), 10 deletions(-) (limited to 'rust/src') diff --git a/rust/src/api_server.rs b/rust/src/api_server.rs index 19cd5fe4..6fbce00b 100644 --- a/rust/src/api_server.rs +++ b/rust/src/api_server.rs @@ -332,8 +332,7 @@ impl Server { .expect("fetch release refs") .iter() .map(|c: &ReleaseContribRow| ReleaseContrib { - // XXX: index: c.index, - index: None, + index: c.index, contrib_type: c.contrib_type.clone(), creator_stub: c.stub.clone(), creator_id: c.creator_ident_id.map(|v| v.to_string()), @@ -396,8 +395,7 @@ impl Server { .expect("fetch release refs") .iter() .map(|c: &ReleaseContribRow| ReleaseContrib { - // XXX: index: c.index, - index: None, + index: c.index, contrib_type: c.contrib_type.clone(), creator_stub: c.stub.clone(), creator_id: c.creator_ident_id.map(|v| v.to_string()), @@ -781,8 +779,7 @@ impl Api for Server { target_release_ident_id: r.target_release_id .clone() .map(|v| uuid::Uuid::parse_str(&v).expect("valid UUID")), - // XXX: index: r.index, - index: None, + index: r.index, stub: r.stub.clone(), }) .collect(); @@ -808,7 +805,7 @@ impl Api for Server { creator_ident_id: c.creator_id .clone() .map(|v| uuid::Uuid::parse_str(&v).expect("valid UUID")), - // XXX: index: r.index, + index: c.index, contrib_type: c.contrib_type.clone(), stub: c.creator_stub.clone(), }) diff --git a/rust/src/database_models.rs b/rust/src/database_models.rs index 1b4841a0..2b205fe7 100644 --- a/rust/src/database_models.rs +++ b/rust/src/database_models.rs @@ -154,7 +154,7 @@ pub struct ReleaseContribRow { pub release_rev: i64, pub creator_ident_id: Option, pub stub: Option, - // XXX: pub index: Option, + pub index: Option, pub contrib_type: Option, } @@ -164,7 +164,7 @@ pub struct ReleaseContribNewRow { pub release_rev: i64, pub creator_ident_id: Option, pub stub: Option, - // XXX: pub index: Option, + pub index: Option, pub contrib_type: Option, } diff --git a/rust/src/database_schema.rs b/rust/src/database_schema.rs index fcbd809c..3adbd63a 100644 --- a/rust/src/database_schema.rs +++ b/rust/src/database_schema.rs @@ -125,8 +125,9 @@ table! { id -> Int8, release_rev -> Int8, creator_ident_id -> Nullable, - stub -> Nullable, contrib_type -> Nullable, + index -> Nullable, + stub -> Nullable, } } -- cgit v1.2.3