accounts/scripts/init-db.sh

15 lines
349 B
Bash
Raw Permalink Normal View History

2026-01-24 22:36:29 +08:00
#!/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
2026-01-24 22:36:29 +08:00
bash scripts/init-db-core.sh
bash scripts/init-db-replication.sh