fix: Add fix for migration of kuzu
This commit is contained in:
parent
a81f1a4551
commit
3371d35ec7
1 changed files with 13 additions and 12 deletions
|
|
@ -53,18 +53,19 @@ def upgrade() -> None:
|
|||
|
||||
graph_config = get_graph_config()
|
||||
if graph_config.graph_database_provider.lower() == "kuzu":
|
||||
kuzu_db_version = read_kuzu_storage_version(graph_config.graph_file_path)
|
||||
if (
|
||||
kuzu_db_version == "0.9.0" or kuzu_db_version == "0.8.2"
|
||||
) and kuzu_db_version != kuzu.__version__:
|
||||
# Try to migrate kuzu database to latest version
|
||||
kuzu_migration(
|
||||
new_db=graph_config.graph_file_path + "_new",
|
||||
old_db=graph_config.graph_file_path,
|
||||
new_version=kuzu.__version__,
|
||||
old_version=kuzu_db_version,
|
||||
overwrite=True,
|
||||
)
|
||||
if os.path.exists(graph_config.graph_file_path):
|
||||
kuzu_db_version = read_kuzu_storage_version(graph_config.graph_file_path)
|
||||
if (
|
||||
kuzu_db_version == "0.9.0" or kuzu_db_version == "0.8.2"
|
||||
) and kuzu_db_version != kuzu.__version__:
|
||||
# Try to migrate kuzu database to latest version
|
||||
kuzu_migration(
|
||||
new_db=graph_config.graph_file_path + "_new",
|
||||
old_db=graph_config.graph_file_path,
|
||||
new_version=kuzu.__version__,
|
||||
old_version=kuzu_db_version,
|
||||
overwrite=True,
|
||||
)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue