diff --git a/py/alembic.ini b/py/alembic.ini index 529bc1cee..5b8449501 100644 --- a/py/alembic.ini +++ b/py/alembic.ini @@ -1,6 +1,6 @@ [alembic] script_location = migrations -sqlalchemy.url = postgresql+asyncpg://postgres:postgres@localhost/postgres +sqlalchemy.url = postgresql://postgres:postgres@localhost:5432/postgres [loggers] keys = root,sqlalchemy,alembic diff --git a/py/migrations/versions/d342e632358a_migrate_to_asyncpg.py b/py/migrations/versions/d342e632358a_migrate_to_asyncpg.py index 6d2191a94..18bf9259c 100644 --- a/py/migrations/versions/d342e632358a_migrate_to_asyncpg.py +++ b/py/migrations/versions/d342e632358a_migrate_to_asyncpg.py @@ -6,6 +6,7 @@ """ +import os from typing import Sequence, Union import sqlalchemy as sa @@ -20,7 +21,7 @@ depends_on: Union[str, Sequence[str], None] = None -project_name = "r2r-test" # Replace with your actual project name +project_name = os.getenv("R2R_PROJECT_NAME") or "r2r_test" new_vector_table_name = "vectors" old_vector_table_name = project_name