workspace/projects/gamilit/apps/database/_deprecated/scripts-violacion-carga-limpia/DB-127-validar-gaps.sh
rckrdmrd ea1879f4ad feat: Initial workspace structure with multi-level Git configuration
- Configure workspace Git repository with comprehensive .gitignore
- Add Odoo as submodule for ERP reference code
- Include documentation: SETUP.md, GIT-STRUCTURE.md
- Add gitignore templates for projects (backend, frontend, database)
- Structure supports independent repos per project/subproject level

Workspace includes:
- core/ - Reusable patterns, modules, orchestration system
- projects/ - Active projects (erp-suite, gamilit, trading-platform, etc.)
- knowledge-base/ - Reference code and patterns (includes Odoo submodule)
- devtools/ - Development tools and templates
- customers/ - Client implementations template

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 10:44:23 -06:00

70 lines
2.0 KiB
Bash
Executable File

#!/bin/bash
# ============================================================================
# Script: Validación de Gaps DB-127
# Fecha: 2025-11-24
# Autor: Database-Agent
# ============================================================================
#
# DESCRIPCIÓN:
# Valida que los 3 gaps Database↔Backend estén resueltos
#
# USO:
# ./scripts/DB-127-validar-gaps.sh [DATABASE_URL]
#
# ============================================================================
set -e # Exit on error
set -u # Exit on undefined variable
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
# Get database URL from argument or environment
DATABASE_URL="${1:-${DATABASE_URL:-}}"
if [ -z "$DATABASE_URL" ]; then
echo -e "${RED}ERROR: DATABASE_URL no está configurada${NC}"
echo "Uso: ./scripts/DB-127-validar-gaps.sh <DATABASE_URL>"
exit 1
fi
echo -e "${BLUE}============================================================================${NC}"
echo -e "${BLUE}VALIDACIÓN DE GAPS DB-127${NC}"
echo -e "${BLUE}============================================================================${NC}"
echo ""
# Extract database name from URL
DB_NAME=$(echo "$DATABASE_URL" | sed -n 's|.*://[^/]*/\([^?]*\).*|\1|p')
echo -e "Base de datos: ${YELLOW}$DB_NAME${NC}"
echo ""
# Run validation SQL script
echo -e "${YELLOW}Ejecutando validación...${NC}"
echo ""
psql "$DATABASE_URL" -f "$(dirname "$0")/validate-gap-fixes.sql"
EXIT_CODE=$?
echo ""
if [ $EXIT_CODE -eq 0 ]; then
echo -e "${GREEN}✅ VALIDACIÓN COMPLETADA${NC}"
echo ""
echo -e "${GREEN}Próximos pasos:${NC}"
echo "1. Verificar que los 3 gaps muestran estado '✅ RESUELTO'"
echo "2. Probar endpoints backend:"
echo " - GET /api/admin/dashboard/actions/recent"
echo " - GET /api/admin/dashboard/alerts"
echo " - GET /api/admin/tenants"
echo " - GET /api/classrooms?is_deleted=false"
echo ""
else
echo -e "${RED}❌ ERROR EN VALIDACIÓN${NC}"
echo "Revisar logs arriba para detalles del error"
exit 1
fi