summaryrefslogtreecommitdiffstats
path: root/rust/src
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-05-13 14:11:29 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-05-13 14:11:31 -0700
commitea9baf30518a713b988c239e97300453cd206355 (patch)
tree4fd809c7f7f78c3b5b3baca1129104d6dd8eeaa1 /rust/src
parenta31e0830b81ae8bcd70d5cc1ed1094509834c455 (diff)
downloadfatcat-ea9baf30518a713b988c239e97300453cd206355.tar.gz
fatcat-ea9baf30518a713b988c239e97300453cd206355.zip
rust: fix creator field order mangling
It's sort of disturbing that this sort of typo/bug can have an actual runtime impact. (struct field order must match schema order)
Diffstat (limited to 'rust/src')
-rw-r--r--rust/src/database_models.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/rust/src/database_models.rs b/rust/src/database_models.rs
index 60d6922c..1b0c2de3 100644
--- a/rust/src/database_models.rs
+++ b/rust/src/database_models.rs
@@ -161,10 +161,10 @@ pub struct CreatorRevRow {
pub id: Uuid,
pub extra_json: Option<serde_json::Value>,
pub display_name: String,
- pub orcid: Option<String>,
- pub wikidata_qid: Option<String>,
pub given_name: Option<String>,
pub surname: Option<String>,
+ pub orcid: Option<String>,
+ pub wikidata_qid: Option<String>,
}
#[derive(Debug, Associations, AsChangeset, Insertable)]
@@ -172,10 +172,10 @@ pub struct CreatorRevRow {
pub struct CreatorRevNewRow {
pub extra_json: Option<serde_json::Value>,
pub display_name: String,
- pub orcid: Option<String>,
- pub wikidata_qid: Option<String>,
pub given_name: Option<String>,
pub surname: Option<String>,
+ pub orcid: Option<String>,
+ pub wikidata_qid: Option<String>,
}
entity_structs!(