Update

parent a9643217
......@@ -25,7 +25,8 @@ A sophisticated Python daemon system for Linux servers with internet exposure, i
### Database Schema
- **Normalized Design**: Optimized relational database structure
- **Primary Matches Table**: Core fixture data with system fields
- **Primary Matches Table**: Core fixture data with system fields and status tracking
- **Match Status System**: Comprehensive status tracking with 8 predefined states
- **Secondary Outcomes Table**: Dynamic result columns with foreign key relationships
- **API Token Management**: Secure token storage with usage tracking
- **File Upload Tracking**: Complete upload lifecycle management
......@@ -120,13 +121,39 @@ DEBUG=false
### Database Schema
The system automatically creates the following tables:
- `users` - User authentication and management
- `matches` - Core fixture data with system fields
- `matches` - Core fixture data with system fields and status tracking
- `match_outcomes` - Dynamic outcome results
- `api_tokens` - User-generated API tokens for external access
- `file_uploads` - Upload tracking and progress
- `system_logs` - Comprehensive logging
- `user_sessions` - Session management
### Match Status System
The matches table includes a comprehensive status tracking system with 8 predefined states:
**Status Values:**
- `pending` - Initial state, match created but not processed
- `scheduled` - Match scheduled for future processing
- `bet` - Match available for betting
- `ingame` - Match currently in progress
- `cancelled` - Match cancelled
- `failed` - Match processing failed
- `paused` - Match temporarily paused
- `done` - Match completed successfully
**Active Status Criteria:**
A match is considered "active" when ALL of these conditions are met:
1. **ZIP Upload Status**: `zip_upload_status == 'completed'`
2. **ZIP File Checksum**: `zip_sha1sum` is present (not null/empty)
3. **Match Status**: `status == 'pending'` (new requirement)
**Status Features:**
- **Automatic Migration**: New column added via database migration system
- **Default Value**: All new matches default to 'pending' status
- **Web Interface**: Status displayed in match detail pages
- **API Integration**: Status available via REST API endpoints
- **Backward Compatibility**: Existing matches retain their current state
## Usage
### Daemon Management
......@@ -695,11 +722,31 @@ curl -H "Authorization: Bearer $API_TOKEN" \
---
**Version**: 1.2.1
**Last Updated**: 2025-08-21
**Version**: 1.2.3
**Last Updated**: 2025-08-26
**Minimum Requirements**: Python 3.8+, MySQL 5.7+, Linux/Windows/macOS
### Recent Updates (v1.2.1) - PyInstaller Enhancement
### Recent Updates (v1.2.3) - Match Status System
-**Match Status Column**: Added comprehensive status tracking system to matches table
- 8 predefined status values: pending, scheduled, bet, ingame, cancelled, failed, paused, done
- Automatic database migration with default 'pending' status for new matches
- Web interface integration with status display in match detail pages
- API endpoints include status information in responses
- Backward compatibility maintained for existing matches
-**Configuration Auto-Migration**: Enhanced persistent directory configuration system
- Automatic copying of .env to persistent config directory when mbetterd.conf doesn't exist
- Improved cross-platform directory detection (Linux /opt, macOS ~/Library, Windows %APPDATA%)
- Better error handling and fallback mechanisms for configuration loading
### Previous Updates (v1.2.2) - Bug Fix
-**Fixture Parser Fighter Column Fix**: Fixed critical bug where both fighter1 and fighter2 were incorrectly mapped to fighter1 column during XLSX upload
- Enhanced [`FixtureParser.detect_required_columns()`](app/upload/fixture_parser.py:179) with specific fighter number matching logic
- Prevents cross-mapping of fighter columns during partial column name matching
- Ensures accurate fighter data separation in database records
- Maintains compatibility with all existing column naming conventions
### Updates (v1.2.1) - PyInstaller Enhancement
-**Cross-Platform Persistent Directories**: Windows (%APPDATA%), macOS (~/Library/Application Support), Linux (/opt/MBetter)
-**Configuration Migration**: Automatic .env to mbetterd.conf migration for PyInstaller deployments
-**Authenticated ZIP Downloads**: Secure API endpoint for ZIP file downloads with token authentication
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment