deployment fix?

This commit is contained in:
Stefan Hardegger
2025-10-20 12:55:56 +02:00
parent 70599083b8
commit 1ee9af8f28
2 changed files with 21 additions and 29 deletions

View File

@@ -57,22 +57,8 @@ fi
# Apply database migrations
echo -e "${YELLOW}🗄️ Applying database migrations...${NC}"
if [ -f "backend/create_backup_jobs_table.sql" ]; then
echo "Applying backup_jobs table migration..."
# Get list of databases
DATABASES=$(docker-compose exec -T postgres psql -U storycove -lqt | cut -d \| -f 1 | grep -E '^ storycove' | sed 's/^[ \t]*//')
# Apply migration to each database
for DB_NAME in $DATABASES; do
echo " - Applying to database: $DB_NAME"
docker-compose exec -T postgres psql -U storycove -d "$DB_NAME" < backend/create_backup_jobs_table.sql 2>&1 | grep -E "(CREATE|ERROR)" || true
done
echo -e "${GREEN}✅ Database migrations applied${NC}"
else
echo -e "${YELLOW}⚠️ No migration files found, skipping...${NC}"
fi
docker-compose run --rm migrations
echo -e "${GREEN}✅ Database migrations applied${NC}"
# Check if Solr is ready
echo -e "${YELLOW}🔍 Checking Solr health...${NC}"