accounts/scripts/init-db.sh

15 lines
349 B
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env bash
set -euo pipefail
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/_common.sh"
echo ">>> 初始化数据库 schema"
if ! command -v psql >/dev/null; then
echo "❌ 未检测到 psql请安装 PostgreSQL 客户端"
exit 1
fi
bash scripts/ensure-db.sh
bash scripts/init-db-core.sh
bash scripts/init-db-replication.sh