Skip to content

Commit

Permalink
πŸ’š Start to migrate existing instances
Browse files Browse the repository at this point in the history
  • Loading branch information
falexwolf committed Dec 31, 2024
1 parent f591899 commit b75ac9b
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lamindb_setup/_connect_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,13 @@ def connect(slug: str, **kwargs) -> str | tuple | None:
settings._instance_settings = None
raise e
# migrate away from lnschema-core
(settings_dir / f"no_lnschema_core-{isettings.slug.replace('/', '')}")
# if not no_lnschema_core_file.exists():
# migrate_lnschema_core(
# isettings, no_lnschema_core_file, write_file=_write_settings
# )
no_lnschema_core_file = (
settings_dir / f"no_lnschema_core-{isettings.slug.replace('/', '--')}"
)
if not no_lnschema_core_file.exists():
migrate_lnschema_core(
isettings, no_lnschema_core_file, write_file=_write_settings
)
return None


Expand Down Expand Up @@ -342,7 +344,6 @@ def migrate_lnschema_core(
cur = conn.cursor()

try:
# check if bionty_source table exists
if db_type == "sqlite":
cur.execute(
"SELECT name FROM sqlite_master WHERE type='table' AND name='lnschema_core_user'"
Expand Down

0 comments on commit b75ac9b

Please sign in to comment.