feat(db): only reinit db if migrations occurred

This commit is contained in:
psychedelicious
2023-12-11 01:09:41 +11:00
parent e46dc9b34e
commit 56966d6d05
2 changed files with 6 additions and 7 deletions

View File

@ -87,9 +87,9 @@ class ApiDependencies:
migration_2.register_post_callback(partial(migrate_embedded_workflows, logger=logger, image_files=image_files))
migrator.register_migration(migration_1)
migrator.register_migration(migration_2)
migrator.run_migrations()
did_migrate = migrator.run_migrations()
if not db.is_memory:
if not db.is_memory and did_migrate:
db.reinitialize()
configuration = config