/
azathd
/
mutiagent
Обзор
Документация
Войти
/
azathd
/
mutiagent
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
scripts/init_db.sh
24 строки
619 B
Your Name
init
15 май 2026, 19:00
15 май 2026, 19:00
6b0bf7e
Код
Авторство
О чём код?
#!/usr/bin/env bash # Apply Postgres schema without Alembic (emergency / broken migrate). set -euo pipefail cd "$(dirname "$0")/.." if [[ ! -f .env ]]; then echo "Missing .env — copy from .env.example and set POSTGRES_PASSWORD" >&2 exit 1 fi set -a # shellcheck disable=SC1091 source .env set +a user="${POSTGRES_USER:-app}" db="${POSTGRES_DB:-xray_multiagent}" echo "Applying deploy/postgres_schema.sql to ${db}..." docker compose exec -T postgres psql -v ON_ERROR_STOP=1 -U "$user" -d "$db" < deploy/postgres_schema.sql echo "" echo "Tables:" docker compose exec postgres psql -U "$user" -d "$db" -c '\dt'