mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-13 18:45:40 +00:00
Maintenance Mode Improvements (#6451)
* Custom migration step in tasks.py - Add custom management command - Wraps migration step in maintenance mode * Rename custom management command to "runmigrations" - Add command to isRunningMigrations * Add new data checks * Update database readiness checks - Set maintenance mode while performing certain management commands * Remove unused import * Re-add syncdb command * Log warning msg * Catch another potential error vector
This commit is contained in:
5
tasks.py
5
tasks.py
@ -369,10 +369,9 @@ def migrate(c):
|
||||
print('Running InvenTree database migrations...')
|
||||
print('========================================')
|
||||
|
||||
manage(c, 'makemigrations')
|
||||
manage(c, 'migrate --noinput')
|
||||
# Run custom management command which wraps migrations in "maintenance mode"
|
||||
manage(c, 'runmigrations', pty=True)
|
||||
manage(c, 'migrate --run-syncdb')
|
||||
manage(c, 'check')
|
||||
|
||||
print('========================================')
|
||||
print('InvenTree database migrations completed!')
|
||||
|
Reference in New Issue
Block a user