summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rust/migrations/2018-05-12-001226_init/up.sql5
-rw-r--r--rust/src/database_models.rs2
-rw-r--r--rust/src/database_schema.rs2
3 files changed, 5 insertions, 4 deletions
diff --git a/rust/migrations/2018-05-12-001226_init/up.sql b/rust/migrations/2018-05-12-001226_init/up.sql
index 5d11191e..5acd7e9d 100644
--- a/rust/migrations/2018-05-12-001226_init/up.sql
+++ b/rust/migrations/2018-05-12-001226_init/up.sql
@@ -124,11 +124,12 @@ CREATE TABLE release_rev (
container_ident_id UUID REFERENCES container_ident(id),
title TEXT NOT NULL,
release_type TEXT, -- TODO: enum
- date TEXT, -- XXX: datetime
- doi TEXT, -- TODO: identifier table?
+ date DATE,
+ doi TEXT,
volume TEXT,
pages TEXT,
issue TEXT
+ -- TODO: identifier table?
);
CREATE INDEX release_rev_doi_idx ON release_rev(doi) WHERE doi IS NOT NULL;
diff --git a/rust/src/database_models.rs b/rust/src/database_models.rs
index 732ceeeb..aaf21ce0 100644
--- a/rust/src/database_models.rs
+++ b/rust/src/database_models.rs
@@ -122,7 +122,7 @@ pub struct ReleaseRevRow {
pub container_ident_id: Option<Uuid>,
pub title: String,
pub release_type: Option<String>,
- pub date: Option<String>,
+ pub date: Option<chrono::NaiveDate>,
pub doi: Option<String>,
pub volume: Option<String>,
pub pages: Option<String>,
diff --git a/rust/src/database_schema.rs b/rust/src/database_schema.rs
index 5ce407b6..3ccf5033 100644
--- a/rust/src/database_schema.rs
+++ b/rust/src/database_schema.rs
@@ -168,7 +168,7 @@ table! {
container_ident_id -> Nullable<Uuid>,
title -> Text,
release_type -> Nullable<Text>,
- date -> Nullable<Text>,
+ date -> Nullable<Date>,
doi -> Nullable<Text>,
volume -> Nullable<Text>,
pages -> Nullable<Text>,