aboutsummaryrefslogtreecommitdiffstats
path: root/rust
diff options
context:
space:
mode:
Diffstat (limited to 'rust')
-rw-r--r--rust/src/api_server.rs10
-rw-r--r--rust/src/lib.rs6
2 files changed, 8 insertions, 8 deletions
diff --git a/rust/src/api_server.rs b/rust/src/api_server.rs
index de776238..e35ffd21 100644
--- a/rust/src/api_server.rs
+++ b/rust/src/api_server.rs
@@ -513,7 +513,7 @@ impl Server {
.bind::<diesel::sql_types::Nullable<diesel::sql_types::Text>, _>(entity.wikidata_qid)
.bind::<diesel::sql_types::Nullable<diesel::sql_types::Text>, _>(entity.abbrev)
.bind::<diesel::sql_types::Nullable<diesel::sql_types::Text>, _>(entity.coden)
- .bind::<diesel::sql_types::Nullable<diesel::sql_types::Json>, _>(entity.extra)
+ .bind::<diesel::sql_types::Nullable<diesel::sql_types::Jsonb>, _>(entity.extra)
.bind::<diesel::sql_types::Uuid, _>(editgroup_id)
.get_result(conn)?;
@@ -552,7 +552,7 @@ impl Server {
.bind::<diesel::sql_types::Nullable<diesel::sql_types::Text>, _>(entity.surname)
.bind::<diesel::sql_types::Nullable<diesel::sql_types::Text>, _>(entity.orcid)
.bind::<diesel::sql_types::Nullable<diesel::sql_types::Text>, _>(entity.wikidata_qid)
- .bind::<diesel::sql_types::Nullable<diesel::sql_types::Json>, _>(entity.extra)
+ .bind::<diesel::sql_types::Nullable<diesel::sql_types::Jsonb>, _>(entity.extra)
.bind::<diesel::sql_types::Uuid, _>(editgroup_id)
.get_result(conn)?;
@@ -586,7 +586,7 @@ impl Server {
.bind::<diesel::sql_types::Nullable<diesel::sql_types::Text>, _>(entity.sha256)
.bind::<diesel::sql_types::Nullable<diesel::sql_types::Text>, _>(entity.md5)
.bind::<diesel::sql_types::Nullable<diesel::sql_types::Text>, _>(entity.mimetype)
- .bind::<diesel::sql_types::Nullable<diesel::sql_types::Json>, _>(entity.extra)
+ .bind::<diesel::sql_types::Nullable<diesel::sql_types::Jsonb>, _>(entity.extra)
.bind::<diesel::sql_types::Uuid, _>(editgroup_id)
.get_result(conn)?;
@@ -712,7 +712,7 @@ impl Server {
.bind::<diesel::sql_types::Nullable<diesel::sql_types::Uuid>, _>(container_id)
.bind::<diesel::sql_types::Nullable<diesel::sql_types::Text>, _>(entity.publisher)
.bind::<diesel::sql_types::Nullable<diesel::sql_types::Text>, _>(entity.language)
- .bind::<diesel::sql_types::Nullable<diesel::sql_types::Json>, _>(entity.extra)
+ .bind::<diesel::sql_types::Nullable<diesel::sql_types::Jsonb>, _>(entity.extra)
.bind::<diesel::sql_types::Uuid, _>(editgroup_id)
.get_result(conn)?;
@@ -836,7 +836,7 @@ impl Server {
INSERT INTO work_edit (editgroup_id, ident_id, rev_id) VALUES
($2, (SELECT ident.id FROM ident), (SELECT rev.id FROM rev))
RETURNING *",
- ).bind::<diesel::sql_types::Nullable<diesel::sql_types::Json>, _>(entity.extra)
+ ).bind::<diesel::sql_types::Nullable<diesel::sql_types::Jsonb>, _>(entity.extra)
.bind::<diesel::sql_types::Uuid, _>(editgroup_id)
.get_result(conn)?;
diff --git a/rust/src/lib.rs b/rust/src/lib.rs
index 50a7d410..356084a5 100644
--- a/rust/src/lib.rs
+++ b/rust/src/lib.rs
@@ -98,9 +98,9 @@ pub fn test_server() -> Result<api_server::Server> {
let conn = server.db_pool.get().expect("db_pool error");
// run migrations; revert latest (dummy data); re-run latest
- diesel_migrations::run_pending_migrations(&conn).unwrap();
- diesel_migrations::revert_latest_migration(&conn).unwrap();
- diesel_migrations::run_pending_migrations(&conn).unwrap();
+ //diesel_migrations::run_pending_migrations(&conn).unwrap();
+ //diesel_migrations::revert_latest_migration(&conn).unwrap();
+ //diesel_migrations::run_pending_migrations(&conn).unwrap();
Ok(server)
}