From 943ca0aa779dd9efc7f9579917b14514a1fa548f Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 14 Aug 2018 21:52:27 -0700 Subject: 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. --- rust/src/api_server.rs | 10 +++++----- rust/src/lib.rs | 6 +++--- 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::, _>(entity.wikidata_qid) .bind::, _>(entity.abbrev) .bind::, _>(entity.coden) - .bind::, _>(entity.extra) + .bind::, _>(entity.extra) .bind::(editgroup_id) .get_result(conn)?; @@ -552,7 +552,7 @@ impl Server { .bind::, _>(entity.surname) .bind::, _>(entity.orcid) .bind::, _>(entity.wikidata_qid) - .bind::, _>(entity.extra) + .bind::, _>(entity.extra) .bind::(editgroup_id) .get_result(conn)?; @@ -586,7 +586,7 @@ impl Server { .bind::, _>(entity.sha256) .bind::, _>(entity.md5) .bind::, _>(entity.mimetype) - .bind::, _>(entity.extra) + .bind::, _>(entity.extra) .bind::(editgroup_id) .get_result(conn)?; @@ -712,7 +712,7 @@ impl Server { .bind::, _>(container_id) .bind::, _>(entity.publisher) .bind::, _>(entity.language) - .bind::, _>(entity.extra) + .bind::, _>(entity.extra) .bind::(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::, _>(entity.extra) + ).bind::, _>(entity.extra) .bind::(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 { 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) } -- cgit v1.2.3