Database Toolkit
The Database Toolkit module helps identify database-related issues and provides options to fix them automatically. This tool is essential for maintaining database health, especially after updates or when troubleshooting issues. It provides two main functions: running migrations to sync your database schema with the latest version, and checking database indexes to ensure optimal query performance.
Navigate to Tools → DB Check to access the Database Toolkit.
Check Your Database for Schema Issues
This section helps ensure your database structure is synchronized with Mumara's current version requirements.
Run Migrations
The Run Migrations feature checks for missing database schema elements and resolves structural issues by synchronizing your database with the latest migration files.
| Element | Description |
|---|---|
| Description text | "Run migrations to check for missing schema elements and resolve issues." - explains the purpose of this function |
| Run Migrations button | Initiates the migration process to sync your database schema |
How It Works
When you click Run Migrations:
- Clears migration history - The system removes entries from the migrations tracking table
- Re-runs migrations - All migration files are executed again from the beginning
- Applies missing changes - Any database structure changes that weren't previously applied are now executed
- Syncs schema - Your database structure is synchronized with the latest migration files included in your Mumara version
When to Use Run Migrations
- After updating Mumara - Ensures new database changes from the update are applied
- When experiencing database errors - Resolves issues caused by missing tables, columns, or constraints
- After restoring from backup - Synchronizes a restored database with current application requirements
- When instructed by support - Mumara support may recommend this to resolve specific issues
Running migrations is designed to be safe - it adds missing elements without destroying existing data. However, always maintain current backups before running migrations, especially in production environments.
Database Indexes
This collapsible section displays all database tables and their index status, checking in realtime against your actual database structure.
All Indexes
The indexes table shows every table in your Mumara database and whether it has the required indexes applied.
| Column | Description |
|---|---|
| Table Name | The name of the database table being checked - lists all tables in your Mumara installation |
| Indexes | Shows the index status for each table - displays "INDEXED" with a green badge when all required indexes are present, or shows missing indexes that need to be applied |
Index Status Indicators
| Status | Meaning |
|---|---|
| INDEXED (green badge) | All required indexes are present on this table - the table is optimized for queries |
| Missing index indicator | One or more required indexes are not present - the table may have slower query performance |
Applying Missing Indexes
When the system detects missing indexes, you have two options for applying them:
Apply Individual Indexes
If specific tables are missing indexes:
- Locate the table with the missing index indicator
- Click the apply button next to that specific table
- The system creates the missing index for that table only
- The status updates to "INDEXED" when complete
Apply All Indexes
To apply all missing indexes at once:
- Click the Apply All button (appears when there are missing indexes)
- The system creates all missing indexes across all tables
- All tables update to show "INDEXED" status when complete
Why Indexes Matter
Database indexes dramatically improve query performance:
- Faster searches - Indexed columns can be searched much faster than unindexed ones
- Improved filtering - Queries that filter by indexed columns execute more efficiently
- Better joins - Relationships between tables perform better with proper indexes
- Reduced server load - Optimized queries consume fewer server resources
Missing indexes can cause:
- Slow page loads throughout the application
- Timeout errors when loading large lists
- High database server CPU usage
- Poor performance as your data grows
Common Use Cases
After Mumara Updates
After applying a Mumara update:
- Navigate to Tools → DB Check
- Click Run Migrations to apply any new schema changes
- Expand Database Indexes to verify all indexes are present
- Apply any missing indexes
Troubleshooting Slow Performance
If the application feels slow:
- Check the Database Indexes section
- Look for tables without the "INDEXED" badge
- Apply missing indexes
- Performance should improve for operations involving those tables
After Database Restoration
If you restored your database from a backup:
- Run Migrations to ensure schema is current
- Check Database Indexes for any missing indexes
- Apply all missing indexes to restore optimal performance
Resolving Database Errors
When encountering "table not found" or "column not found" errors:
- Click Run Migrations to create missing schema elements
- The migration process will add any missing tables or columns
- Refresh the page that was showing errors
Best Practices
Regular Maintenance
- Check after updates - Always visit DB Check after applying Mumara updates
- Monitor index status - Periodically verify all tables show "INDEXED"
- Maintain backups - Keep current backups before running migrations
Before Running Migrations
- Backup your database - Create a full backup before schema changes
- Low-traffic timing - Run during periods of low activity when possible
- Review update notes - Check release notes for any special migration instructions
Performance Optimization
- Apply all indexes - Don't leave tables with missing indexes
- Monitor after changes - Verify performance improves after applying indexes
- Regular checks - Include DB Check in your monthly maintenance routine
Troubleshooting
Migration Fails to Complete
Possible causes:
- Database connection timeout
- Insufficient database permissions
- Conflicting table locks
Solutions:
- Check database connectivity in Debug Logs
- Verify database user has ALTER and CREATE permissions
- Try again during lower-traffic periods
- Contact support if errors persist
Indexes Won't Apply
Possible causes:
- Table is locked by another process
- Insufficient disk space for index creation
- Database user lacks INDEX privilege
Solutions:
- Wait for active operations to complete and try again
- Check available disk space on database server
- Verify database user permissions include CREATE INDEX
- Review Debug Logs for specific error messages
Tables Still Show Missing After Migration
Possible causes:
- Migration file is missing or corrupted
- Migration ran but didn't complete all steps
- Database version compatibility issue
Solutions:
- Verify Mumara installation files are complete
- Check Debug Logs for migration errors
- Contact Mumara support with specific error details
Next Steps
- Debug Logs - View application error logs for migration issues
- PHP Info - Verify PHP and server configuration
- Cron Status - Ensure scheduled tasks are running
- Failed Jobs - Check for database-related job failures