aboutsummaryrefslogtreecommitdiffstats
path: root/rust
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-05-08 23:40:24 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-05-08 23:40:26 -0700
commit18eff40d11a4c9deaf65bb5a43e7c3efb33aa1d0 (patch)
tree915d0a70753abbe15123d1015f9d364fc91339bf /rust
parent89b04e5f716ac486f42ea8c55976ce7231ef692e (diff)
downloadfatcat-18eff40d11a4c9deaf65bb5a43e7c3efb33aa1d0.tar.gz
fatcat-18eff40d11a4c9deaf65bb5a43e7c3efb33aa1d0.zip
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.
Diffstat (limited to 'rust')
-rw-r--r--rust/Cargo.toml2
-rw-r--r--rust/src/database_schema.rs14
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<Text>,
index_val -> Nullable<Int4>,
extra_json -> Nullable<Jsonb>,
+ given_name -> Nullable<Text>,
+ surname -> Nullable<Text>,
}
}
@@ -297,7 +299,7 @@ table! {
title -> Text,
original_title -> Nullable<Text>,
release_type -> Nullable<Text>,
- release_status -> Nullable<Text>,
+ release_stage -> Nullable<Text>,
release_date -> Nullable<Date>,
release_year -> Nullable<Int8>,
doi -> Nullable<Text>,
@@ -314,6 +316,14 @@ table! {
publisher -> Nullable<Text>,
language -> Nullable<Text>,
license_slug -> Nullable<Text>,
+ number -> Nullable<Text>,
+ version -> Nullable<Text>,
+ subtitle -> Nullable<Text>,
+ withdrawn_state -> Nullable<Text>,
+ withdrawn_date -> Nullable<Date>,
+ withdrawn_year -> Nullable<Int8>,
+ mag_id -> Nullable<Text>,
+ ark_id -> Nullable<Text>,
}
}
@@ -369,6 +379,8 @@ table! {
status_code -> Nullable<Int8>,
sha1 -> Text,
sha256 -> Nullable<Text>,
+ size_bytes -> Nullable<Int8>,
+ extra_json -> Nullable<Jsonb>,
}
}