mirror of
https://github.com/PostHog/posthog.git
synced 2026-10-29 09:58:48 +08:00
Co-authored-by: mendral-app[bot] <233154221+mendral-app[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: tests-posthog[bot] <250237707+tests-posthog[bot]@users.noreply.github.com> Co-authored-by: dmarticus <dylan@posthog.com>
17 lines
584 B
Bash
Executable File
17 lines
584 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
set -u
|
|
|
|
echo "Checking if database 'agent_runtime_queue' exists..."
|
|
DB_EXISTS=$(psql -U "$POSTGRES_USER" -tAc "SELECT 1 FROM pg_database WHERE datname='agent_runtime_queue'")
|
|
|
|
if [ -z "$DB_EXISTS" ]; then
|
|
echo "Creating database 'agent_runtime_queue'..."
|
|
psql -U "$POSTGRES_USER" -c "CREATE DATABASE agent_runtime_queue;"
|
|
psql -U "$POSTGRES_USER" -c "GRANT ALL PRIVILEGES ON DATABASE agent_runtime_queue TO $POSTGRES_USER;"
|
|
echo "Database 'agent_runtime_queue' created successfully"
|
|
else
|
|
echo "Database 'agent_runtime_queue' already exists"
|
|
fi
|