Fix pgAdmin email validation and add SQL verification queries

PGADMIN FIX:

- Changed email from admin@businessanalytics.local to admin@example.com

- pgAdmin rejects .local domains as invalid email addresses

- Updated all documentation with correct email

SETUP VERIFICATION:

- Added 5 SQL verification queries to setup-database.sh

- Query 1: Sample countries (top 5)

- Query 2: Sample merchant categories (top 5)

- Query 3: All transaction types with descriptions

- Query 4: All fraud types ordered by severity

- Query 5: All customer segments with descriptions

BENEFITS:

- Users can immediately see that data was loaded correctly

- Provides visual confirmation of schema setup

- Shows sample data structure before generating full dataset

- Helps troubleshoot setup issues early
This commit is contained in:
Alphaeus Mote
2025-10-24 12:13:46 -04:00
parent 770927459f
commit dc5e9f8597
4 changed files with 37 additions and 5 deletions
+1 -1
View File
@@ -163,7 +163,7 @@ http://localhost:3000
``` ```
**Login credentials:** **Login credentials:**
- Email: `admin@businessanalytics.local` - Email: `admin@example.com`
- Password: `SecurePass123!` - Password: `SecurePass123!`
**First time setup:** **First time setup:**
+1 -1
View File
@@ -34,7 +34,7 @@ services:
image: dpage/pgadmin4:latest image: dpage/pgadmin4:latest
container_name: business_analytics_ui container_name: business_analytics_ui
environment: environment:
PGADMIN_DEFAULT_EMAIL: admin@businessanalytics.local PGADMIN_DEFAULT_EMAIL: admin@example.com
PGADMIN_DEFAULT_PASSWORD: SecurePass123! PGADMIN_DEFAULT_PASSWORD: SecurePass123!
PGADMIN_CONFIG_SERVER_MODE: 'False' PGADMIN_CONFIG_SERVER_MODE: 'False'
PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED: 'False' PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED: 'False'
+1 -1
View File
@@ -142,7 +142,7 @@ The script shows progress for each step:
1. Open your browser to: **http://localhost:3000** 1. Open your browser to: **http://localhost:3000**
2. **Login:** 2. **Login:**
- Email: `admin@businessanalytics.local` - Email: `admin@example.com`
- Password: `SecurePass123!` - Password: `SecurePass123!`
3. **First time setup - Add Server:** 3. **First time setup - Add Server:**
- Click "Add New Server" - Click "Add New Server"
+34 -2
View File
@@ -157,13 +157,45 @@ fraud_type_count=$(execute_sql "SELECT COUNT(*) FROM fraud_types;" | grep -E '^\
echo -e "Fraud types: ${GREEN}$fraud_type_count${NC}" echo -e "Fraud types: ${GREEN}$fraud_type_count${NC}"
echo "" echo ""
echo -e "${BLUE}============================================================================${NC}"
echo -e "${YELLOW}Running verification queries...${NC}"
echo -e "${BLUE}============================================================================${NC}"
echo ""
# Query 1: Show sample countries
echo -e "${YELLOW}[1/5] Sample countries:${NC}"
execute_sql "SELECT country_code, country_name FROM countries ORDER BY country_name LIMIT 5;"
echo ""
# Query 2: Show merchant categories
echo -e "${YELLOW}[2/5] Sample merchant categories:${NC}"
execute_sql "SELECT category_code, category_name FROM merchant_categories ORDER BY category_name LIMIT 5;"
echo ""
# Query 3: Show transaction types
echo -e "${YELLOW}[3/5] Transaction types:${NC}"
execute_sql "SELECT type_code, type_name, description FROM transaction_types ORDER BY type_name;"
echo ""
# Query 4: Show fraud types
echo -e "${YELLOW}[4/5] Fraud types:${NC}"
execute_sql "SELECT fraud_type_code, fraud_type_name, severity FROM fraud_types ORDER BY severity DESC, fraud_type_name;"
echo ""
# Query 5: Show customer segments
echo -e "${YELLOW}[5/5] Customer segments:${NC}"
execute_sql "SELECT segment_code, segment_name, description FROM customer_segments ORDER BY segment_name;"
echo ""
echo -e "${GREEN}============================================================================${NC}" echo -e "${GREEN}============================================================================${NC}"
echo -e "${GREEN}✓ Database setup completed successfully!${NC}" echo -e "${GREEN}✓ Database setup completed successfully!${NC}"
echo -e "${GREEN}============================================================================${NC}" echo -e "${GREEN}============================================================================${NC}"
echo "" echo ""
echo -e "${YELLOW}Next steps:${NC}" echo -e "${YELLOW}Next steps:${NC}"
echo -e "1. Generate test data: ${BLUE}./scripts/generate-data.sh${NC}" echo -e "1. Generate test data: ${BLUE}./data/generate_data.sh${NC}"
echo -e "2. Access DB-UI at: ${BLUE}http://localhost:3000${NC}" echo -e "2. Access pgAdmin at: ${BLUE}http://localhost:3000${NC}"
echo -e " - Email: ${GREEN}admin@example.com${NC}"
echo -e " - Password: ${GREEN}SecurePass123!${NC}"
echo -e "3. Start learning SQL with exercises in: ${BLUE}./exercises/${NC}" echo -e "3. Start learning SQL with exercises in: ${BLUE}./exercises/${NC}"
echo "" echo ""