diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6cefec5..c9703cd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -65,7 +65,7 @@ jobs: - name: Run tests run: pytest --cov=project --splits 4 --group ${{ matrix.group }} env: - TEST_DATABASE_URL: postgresql://postgres:postgres@localhost/eventcally_tests + TEST_DATABASE_URL: postgresql://postgres:postgres@postgres/eventcally_tests TEST_REDIS_URL: redis://localhost:6379 - name: Upload coverage diff --git a/migrations/versions/3c5b34fd1156_.py b/migrations/versions/3c5b34fd1156_.py index 934baa5..cc7d037 100644 --- a/migrations/versions/3c5b34fd1156_.py +++ b/migrations/versions/3c5b34fd1156_.py @@ -9,7 +9,7 @@ import sqlalchemy as sa import sqlalchemy_utils from alembic import op from sqlalchemy import orm -from sqlalchemy.ext.declarative import declarative_base +from sqlalchemy.orm import declarative_base from project import dbtypes diff --git a/migrations/versions/f350153a5691_.py b/migrations/versions/f350153a5691_.py index df338e3..f073731 100644 --- a/migrations/versions/f350153a5691_.py +++ b/migrations/versions/f350153a5691_.py @@ -10,7 +10,7 @@ import sqlalchemy_utils from alembic import op from sqlalchemy import orm from sqlalchemy.dialects import postgresql -from sqlalchemy.ext.declarative import declarative_base +from sqlalchemy.orm import declarative_base from project import dbtypes diff --git a/project/dbtypes.py b/project/dbtypes.py index ea1e443..a7b2e02 100644 --- a/project/dbtypes.py +++ b/project/dbtypes.py @@ -4,6 +4,7 @@ from sqlalchemy.types import TypeDecorator class IntegerEnum(TypeDecorator): impl = Integer + cache_ok = True def __init__(self, enumtype, *args, **kwargs): super().__init__(*args, **kwargs)