Update README with enhanced database and migration documentation
This commit is contained in:
parent
8f5fb8073c
commit
74c77ba3ea
26
README.md
26
README.md
@ -133,6 +133,27 @@ The application is configured to use SQLite with the following database location
|
||||
|
||||
The application automatically selects the first available and writable location from this list.
|
||||
|
||||
### Enhanced Database Reliability
|
||||
|
||||
The application includes several features to ensure robust and reliable database operations:
|
||||
|
||||
1. **Multi-path discovery**: Automatically finds and uses the first writable database location
|
||||
2. **Directory creation**: Creates database directories if they don't exist
|
||||
3. **Database initialization**: Initializes the database with required tables using both SQLAlchemy and direct SQLite
|
||||
4. **Connection retry logic**: Automatically retries database connections with exponential backoff
|
||||
5. **SQLite optimizations**: Uses WAL journal mode and other SQLite performance optimizations
|
||||
6. **Error diagnostic logging**: Comprehensive error logging for easier troubleshooting
|
||||
7. **Fallback mechanisms**: Falls back to direct SQLite operations if SQLAlchemy fails
|
||||
|
||||
### Alembic Migration Enhancements
|
||||
|
||||
Alembic migrations include robust error handling and initialization:
|
||||
|
||||
1. **Pre-migration checks**: Verifies database directories exist and are writable
|
||||
2. **Auto-creation**: Creates necessary directories and initializes the database file
|
||||
3. **Retry logic**: Implements retry logic for migration operations
|
||||
4. **Detailed diagnostics**: Provides detailed error information for failed migrations
|
||||
|
||||
## Getting Started
|
||||
|
||||
### Installation
|
||||
@ -149,6 +170,11 @@ The application automatically selects the first available and writable location
|
||||
alembic upgrade head
|
||||
```
|
||||
|
||||
The migration process will automatically:
|
||||
1. Create the database directory if it doesn't exist
|
||||
2. Initialize the database file if needed
|
||||
3. Apply all migrations with retry logic for reliability
|
||||
|
||||
### Starting the Application
|
||||
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user