From 41db92b9e8f1cc05055e1515e4d223d0185aea56 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Mon, 11 Dec 2023 12:47:52 +1100 Subject: [PATCH] feat(db): add check for missing migration from 0 --- invokeai/app/services/shared/sqlite/sqlite_migrator.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/invokeai/app/services/shared/sqlite/sqlite_migrator.py b/invokeai/app/services/shared/sqlite/sqlite_migrator.py index 9a6984dbd3..0ea43d0eb2 100644 --- a/invokeai/app/services/shared/sqlite/sqlite_migrator.py +++ b/invokeai/app/services/shared/sqlite/sqlite_migrator.py @@ -91,6 +91,8 @@ class MigrationSet: if self.latest_version == 0: return next_migration = self.get(from_version=0) + if next_migration is None: + raise MigrationError("Migration chain is fragmented") touched_count = 1 while next_migration is not None: next_migration = self.get(next_migration.to_version)