- Implemented retry mechanism for database table creation, transaction management, and query execution to handle "database is locked" errors.
- Added helper functions for executing SQL commands with retries, improving robustness during concurrent access.
- Introduced migration lock file management to prevent concurrent migrations and ensure safe initialization.
- Updated the initialize function to check for migration locks and handle stale locks appropriately.
- Enhanced error handling during database operations, including logging and rollback mechanisms.
- Added support for skipping migrations if another process is already handling them.
- Added scripts for debugging and fixing SQLite issues.
- Enhanced user model to support both SQLite and JSON storage.
- Improved database initialization with better error handling and permission checks.
- Implemented JSON file management for migration and cleanup.
- Updated migration utility to track and log migrated records.