Commit Graph

5 Commits

Author SHA1 Message Date
4731fd644a fix(tests): resolve 13 failing unit tests
- Use dynamic APP_VERSION instead of hardcoded v1.3.6 in:
  test_template_helpers, test_health, test_page_controller
- Add unresolved_folders to EXPECTED_TABLES in database/init.py
- Fix shallow copy bug in test_serie_scanner.py episodeDict comparison
- Update test_schema_constants to expect 6 tables instead of 5
2026-06-11 08:36:41 +02:00
69c2fd01f9 chore: bump version to 1.0.1 2026-05-14 17:30:13 +02:00
c693c6572b Fix NFO batch endpoint route priority and test fixture 2026-01-27 18:10:16 +01:00
842f9c88eb migration removed 2025-12-10 21:12:34 +01:00
30de86e77a feat(database): Add comprehensive database initialization module
- Add src/server/database/init.py with complete initialization framework
  * Schema creation with idempotent table generation
  * Schema validation with detailed reporting
  * Schema versioning (v1.0.0) and migration support
  * Health checks with connectivity monitoring
  * Backup functionality for SQLite databases
  * Initial data seeding framework
  * Utility functions for database info and migration guides

- Add comprehensive test suite (tests/unit/test_database_init.py)
  * 28 tests covering all functionality
  * 100% test pass rate
  * Integration tests and error handling

- Update src/server/database/__init__.py
  * Export new initialization functions
  * Add schema version and expected tables constants

- Fix syntax error in src/server/models/anime.py
  * Remove duplicate import statement

- Update instructions.md
  * Mark database initialization task as complete

Features:
- Automatic schema creation and validation
- Database health monitoring
- Backup creation with timestamps
- Production-ready with Alembic migration guidance
- Async/await support throughout
- Comprehensive error handling and logging

Test Results: 69/69 database tests passing (100%)
2025-10-19 17:21:31 +02:00