From 18eff40d11a4c9deaf65bb5a43e7c3efb33aa1d0 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 8 May 2019 23:40:24 -0700 Subject: codegen diesel rust schema The number of fields on release_rev went over 32, so we need the (slow) 64 column feature of diesel. Might be possible to get back under that if we don't use some of these columns after all. --- rust/Cargo.toml | 2 +- rust/src/database_schema.rs | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 2344bda2..c7368100 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -11,7 +11,7 @@ members = ["fatcat-api-spec"] [dependencies] fatcat-api-spec = {version = "*", path = "fatcat-api-spec", features = ["server"] } -diesel = { version = "1.3", features = ["postgres", "uuid", "serde_json", "chrono", "r2d2"] } +diesel = { version = "1.3", features = ["postgres", "uuid", "serde_json", "chrono", "r2d2", "64-column-tables"] } diesel_migrations = "1.3" dotenv = "0.9.0" clap = "2" diff --git a/rust/src/database_schema.rs b/rust/src/database_schema.rs index ea184226..ce4f5c49 100644 --- a/rust/src/database_schema.rs +++ b/rust/src/database_schema.rs @@ -254,6 +254,8 @@ table! { raw_affiliation -> Nullable, index_val -> Nullable, extra_json -> Nullable, + given_name -> Nullable, + surname -> Nullable, } } @@ -297,7 +299,7 @@ table! { title -> Text, original_title -> Nullable, release_type -> Nullable, - release_status -> Nullable, + release_stage -> Nullable, release_date -> Nullable, release_year -> Nullable, doi -> Nullable, @@ -314,6 +316,14 @@ table! { publisher -> Nullable, language -> Nullable, license_slug -> Nullable, + number -> Nullable, + version -> Nullable, + subtitle -> Nullable, + withdrawn_state -> Nullable, + withdrawn_date -> Nullable, + withdrawn_year -> Nullable, + mag_id -> Nullable, + ark_id -> Nullable, } } @@ -369,6 +379,8 @@ table! { status_code -> Nullable, sha1 -> Text, sha256 -> Nullable, + size_bytes -> Nullable, + extra_json -> Nullable, } } -- cgit v1.2.3