From fcd11c341c9b4d7fdad61d33be45dab1fcb7f501 Mon Sep 17 00:00:00 2001 From: azivner Date: Thu, 18 Jan 2018 19:04:30 -0500 Subject: [PATCH] added consitency check for null title or text --- services/consistency_checks.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/services/consistency_checks.js b/services/consistency_checks.js index 3ce7f2ebe..8be92d2e7 100644 --- a/services/consistency_checks.js +++ b/services/consistency_checks.js @@ -198,6 +198,16 @@ async function runAllChecks() { AND images.is_deleted = 1`, "Note image is not deleted while image is deleted for note_image_id", errorList); + await runCheck(` + SELECT + note_id + FROM + notes + WHERE + is_deleted = 0 + AND (note_title IS NULL OR note_text IS NULL)`, + "Note has null title or text", errorList); + await runSyncRowChecks("notes", "note_id", errorList); await runSyncRowChecks("notes_history", "note_history_id", errorList); await runSyncRowChecks("notes_tree", "note_tree_id", errorList);