Skip to content

Commit

Permalink
remove old data migration from previous schema version
Browse files Browse the repository at this point in the history
  • Loading branch information
maryhipp committed Mar 8, 2024
1 parent d567415 commit 281222d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 172 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
from invokeai.app.services.config import InvokeAIAppConfig
from invokeai.app.services.shared.sqlite_migrator.sqlite_migrator_common import Migration

from .util.migrate_yaml_config_1 import MigrateModelYamlToDb1


class Migration3Callback:
def __init__(self, app_config: InvokeAIAppConfig, logger: Logger) -> None:
Expand All @@ -15,7 +13,6 @@ def __init__(self, app_config: InvokeAIAppConfig, logger: Logger) -> None:
def __call__(self, cursor: sqlite3.Cursor) -> None:
self._drop_model_manager_metadata(cursor)
self._recreate_model_config(cursor)
self._migrate_model_config_records(cursor)

def _drop_model_manager_metadata(self, cursor: sqlite3.Cursor) -> None:
"""Drops the `model_manager_metadata` table."""
Expand Down Expand Up @@ -55,12 +52,6 @@ def _recreate_model_config(self, cursor: sqlite3.Cursor) -> None:
"""
)

def _migrate_model_config_records(self, cursor: sqlite3.Cursor) -> None:
"""After updating the model config table, we repopulate it."""
self._logger.info("Migrating model config records from models.yaml to database")
model_record_migrator = MigrateModelYamlToDb1(self._app_config, self._logger, cursor)
model_record_migrator.migrate()


def build_migration_3(app_config: InvokeAIAppConfig, logger: Logger) -> Migration:
"""
Expand Down

This file was deleted.

0 comments on commit 281222d

Please sign in to comment.