upskill-event-manager/bin/debug-attendee-data.sh
Ben Reed 3e23a0884e feat: Add comprehensive data seeding scripts for testing infrastructure
- Add essential data seeding scripts to version control
- Update .gitignore to whitelist bin/ directory for key testing scripts
- Include comprehensive test data creation for trainers, events, attendees, and certificates
- Scripts use environment variables for credentials (no hardcoded secrets)
- Supports both regular trainers and master trainers with proper roles
- Includes debugging and data enhancement utilities

Scripts included:
- create-comprehensive-test-data.sh: Full staging data setup with users/events/certificates
- create-staging-test-data.sh: Staging environment test data creation
- create-complete-test-data.sh: Complete test data with attendees and check-ins
- create-test-attendees.sh: Attendee and ticket order generation
- enhance-test-data-revenue.sh: Revenue data enhancement for testing
- fix-and-create-test-data.sh: Data fixing and creation combined
- debug-attendee-data.sh: Attendee data debugging utilities
2025-08-11 15:44:27 -03:00

35 lines
No EOL
1.7 KiB
Bash
Executable file

#!/bin/bash
# Debug script to check event and attendee data on staging
source .env
echo "=== Debug Attendee Data ==="
echo "Target: $UPSKILL_STAGING_IP"
echo "==============================="
sshpass -p "$UPSKILL_STAGING_PASS" ssh -o StrictHostKeyChecking=no $UPSKILL_STAGING_SSH_USER@$UPSKILL_STAGING_IP << 'EOF'
echo "=== 1. Check test_trainer user ID ==="
wp user get test_trainer --field=ID --path=/home/974670.cloudwaysapps.com/uberrxmprk/public_html
echo ""
echo "=== 2. Check all events by test_trainer (ID 66) ==="
wp db query "SELECT ID, post_title, post_author, post_status, post_type, post_date FROM wp_posts WHERE post_type = 'tribe_events' AND post_author = 66 ORDER BY post_date DESC;" --path=/home/974670.cloudwaysapps.com/uberrxmprk/public_html
echo ""
echo "=== 3. Check all recent tribe_events ==="
wp db query "SELECT ID, post_title, post_author, post_status, post_type, post_date FROM wp_posts WHERE post_type = 'tribe_events' AND post_date > '2025-08-10' ORDER BY post_date DESC;" --path=/home/974670.cloudwaysapps.com/uberrxmprk/public_html
echo ""
echo "=== 4. Check existing attendees ==="
wp db query "SELECT p.ID, p.post_type, p.post_parent, p.post_status, p.post_title FROM wp_posts p WHERE p.post_type IN ('tribe_tpp_attendees', 'tec_tc_attendee') ORDER BY p.post_date DESC LIMIT 10;" --path=/home/974670.cloudwaysapps.com/uberrxmprk/public_html
echo ""
echo "=== 5. Check wp_posts table structure for recent events ==="
wp db query "SELECT ID, post_title, post_author, post_status, post_type, post_date FROM wp_posts WHERE post_date > '2025-08-10' ORDER BY post_date DESC LIMIT 20;" --path=/home/974670.cloudwaysapps.com/uberrxmprk/public_html
EOF
echo ""
echo "Debug complete!"