update DB table

This commit is contained in:
2025-12-27 20:08:16 +01:00
parent 58be2d600c
commit 3f903f8fcc
2 changed files with 23 additions and 13 deletions

View File

@@ -16,7 +16,17 @@ echo "🚀 Starting TestArena Deployment..."
# 1. Install System Dependencies
echo "📦 Installing system dependencies..."
apt-get update
apt-get install -y nginx python3-pip python3-venv
apt-get install -y nginx python3-pip python3-venv sqlite3
# 1.1 Database Migration (Add source column if missing)
echo "🗄️ Checking database schema..."
DB_PATH="/home/asf/testarena/testarena.db"
if [ -f "$DB_PATH" ]; then
if ! sqlite3 "$DB_PATH" ".schema queues" | grep -q "source"; then
echo " Adding 'source' column to 'queues' table..."
sqlite3 "$DB_PATH" "ALTER TABLE queues ADD COLUMN source TEXT;"
fi
fi
# 2. Set up Python Virtual Environment
echo "🐍 Setting up Python environment..."