feat(db): decouple from SqliteDatabase

This commit is contained in:
psychedelicious
2023-12-10 22:17:03 +11:00
parent f8e4b93a74
commit 83e820d721
4 changed files with 46 additions and 39 deletions

View File

@ -73,7 +73,7 @@ class ApiDependencies:
image_files = DiskImageFileStorage(f"{output_folder}/images")
db = SqliteDatabase(config, logger)
migrator = SQLiteMigrator(db=db, image_files=image_files)
migrator = SQLiteMigrator(database=db.database, lock=db.lock, image_files=image_files, logger=logger)
migrator.register_migration(migration_1)
migrator.register_migration(migration_2)
migrator.run_migrations()