Update bootstrap_db.sh

This commit is contained in:
Andras Bacsai
2026-03-16 12:46:41 +01:00
committed by GitHub
parent af0c21d332
commit 71ce4f3301

View File

@@ -1,20 +1,2 @@
#!/bin/bash #!/bin/bash
set -e echo "it works"
echo "Waiting for PostgreSQL to be ready..."
until psql -h "$DB_HOST" -U "$DB_USER" -d "$DB_NAME" -c '\q' 2>/dev/null; do
sleep 1
done
echo "Creating test table..."
psql -h "$DB_HOST" -U "$DB_USER" -d "$DB_NAME" <<SQL
CREATE TABLE IF NOT EXISTS test_table (
id SERIAL PRIMARY KEY,
name VARCHAR(100) NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
INSERT INTO test_table (name) VALUES ('hello from bootstrap');
SQL
echo "Bootstrap complete!"