Files
mtusi2026lab2/scripts/explain_history.sh
T

12 lines
295 B
Bash
Executable File

#!/bin/sh
set -eu
project_root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
cd "$project_root"
env_file=${ENV_FILE:-.env}
docker compose --env-file "$env_file" exec -T postgres sh -ec \
'exec psql -v ON_ERROR_STOP=1 -U "$POSTGRES_USER" -d "$POSTGRES_DB"' \
< tests/explain_history.sql