Skip to content

v0.2.6 - Database Reset & Recovery

Choose a tag to compare

@izzoa izzoa released this 07 Nov 23:03
· 85 commits to master since this release

New Features

Database Management Commands

  • plexmix db info - Show database statistics, file sizes, and health metrics
  • plexmix db reset - Safely reset database with automatic backup creation

Automatic Recovery System

  • Auto-detect missing or empty database files
  • Automatically initialize schema when needed
  • Prevent migration errors on corrupted databases

Enhancements

Safety Features

  • Automatic timestamped backups in ~/.plexmix/backups/
  • Interactive confirmation prompts before destructive operations
  • Statistics preview showing what will be deleted
  • Clear messaging about preserved vs deleted data

Database Resilience

  • Handles accidental database deletion gracefully
  • Auto-recovery from empty database files
  • Corruption detection and safe recreation

Commands

# View database information
plexmix db info

# Reset database (with backup)
plexmix db reset

# Reset without confirmation
plexmix db reset --force

# Reset without backup (not recommended)
plexmix db reset --no-backup

What Gets Deleted

  • SQLite database (~/.plexmix/plexmix.db)
  • FAISS embeddings index (~/.plexmix/embeddings.index)
  • All synced metadata, tags, playlists, and embeddings

What Gets Preserved

  • Your music files on Plex server (unchanged)
  • Plex server metadata (unchanged)
  • PlexMix configuration (.env, config.yaml)
  • API keys

Documentation

  • Added Database Management section to README
  • Command reference table for all database operations
  • Updated feature list to highlight resilience

Files Changed

  • src/plexmix/cli/main.py - Added db command group
  • src/plexmix/database/recovery.py - New recovery module
  • src/plexmix/database/sqlite_manager.py - Enhanced auto-recovery
  • README.md - Complete database management docs
  • pyproject.toml - Version bump to 0.2.6

Testing

All 91 tests passing ✅