From 45cf7f1fa1e2c00afde506bfada625af9d7d4eb3 Mon Sep 17 00:00:00 2001 From: Sven Klemm Date: Sat, 12 Feb 2022 18:05:20 +0100 Subject: [PATCH] Document requirements for statements in sql files Since we now lock down search_path during update/downgrade there are some additional requirements for writing sql files. --- scripts/check_update_scripts.sh | 2 +- sql/updates/README.md | 48 ++++++++++++++++++++------------- 2 files changed, 30 insertions(+), 20 deletions(-) diff --git a/scripts/check_update_scripts.sh b/scripts/check_update_scripts.sh index f0daab9a5..d770e4331 100755 --- a/scripts/check_update_scripts.sh +++ b/scripts/check_update_scripts.sh @@ -3,7 +3,7 @@ SCRIPT_DIR=$(dirname ${0}) SRC_DIR=$(dirname ${SCRIPT_DIR}) -if grep -ir "IF NOT EXISTS" ${SRC_DIR}/sql; then +if grep -i "IF NOT EXISTS" ${SRC_DIR}/sql/*.sql ${SRC_DIR}/sql/*/*.sql; then cat <