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
|
|
|
|
|
|
|
2026-01-24 22:57:37 +08:00
|
|
|
|
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
|