mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-13 18:14:24 +02:00
fix makemigrations being blocked by check_migrations func
This commit is contained in:
@@ -35,8 +35,9 @@ def check_migrations():
|
|||||||
from ..index.sql import list_migrations
|
from ..index.sql import list_migrations
|
||||||
|
|
||||||
pending_migrations = [name for status, name in list_migrations() if not status]
|
pending_migrations = [name for status, name in list_migrations() if not status]
|
||||||
|
is_migrating = any(arg in sys.argv for arg in ['makemigrations', 'migrate', 'init'])
|
||||||
|
|
||||||
if pending_migrations:
|
if pending_migrations and not is_migrating:
|
||||||
print('[red][X] This collection was created with an older version of ArchiveBox and must be upgraded first.[/red]')
|
print('[red][X] This collection was created with an older version of ArchiveBox and must be upgraded first.[/red]')
|
||||||
print(f' {DATA_DIR}', file=sys.stderr)
|
print(f' {DATA_DIR}', file=sys.stderr)
|
||||||
print(file=sys.stderr)
|
print(file=sys.stderr)
|
||||||
|
Reference in New Issue
Block a user