Initial miaojingAI project with image resolution guard
This commit is contained in:
20
scripts/apply-database-patch.sh
Normal file
20
scripts/apply-database-patch.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
set -Eeuo pipefail
|
||||
|
||||
COZE_WORKSPACE_PATH="${COZE_WORKSPACE_PATH:-$(pwd)}"
|
||||
|
||||
if [ -f "${COZE_WORKSPACE_PATH}/.env.local" ]; then
|
||||
set +u
|
||||
set -a
|
||||
# shellcheck disable=SC1091
|
||||
source "${COZE_WORKSPACE_PATH}/.env.local"
|
||||
set +a
|
||||
set -u
|
||||
fi
|
||||
|
||||
if [ -z "${LOCAL_DB_URL:-}" ]; then
|
||||
echo "LOCAL_DB_URL is not set" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
psql "${LOCAL_DB_URL}" -v ON_ERROR_STOP=1 -f "${COZE_WORKSPACE_PATH}/scripts/database-optimization-patch.sql"
|
||||
Reference in New Issue
Block a user