aboutsummaryrefslogtreecommitdiffstats
path: root/rust/src
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-08-14 21:52:27 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-08-14 21:52:51 -0700
commit943ca0aa779dd9efc7f9579917b14514a1fa548f (patch)
treec71239067d6d34bc7a204c64692a187c2ba8c258 /rust/src
parent8136c7bdfb3f96b506001a083b4b92ebd15e083a (diff)
downloadfatcat-943ca0aa779dd9efc7f9579917b14514a1fa548f.tar.gz
fatcat-943ca0aa779dd9efc7f9579917b14514a1fa548f.zip
cockroach: don't auto-wipe tables in tests (for now)
This fixes the OID type 114 bug; schema had been updated, but didn't update insert statements/casts.
Diffstat (limited to 'rust/src')
-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)
}