diff --git a/redbeanpython/config.py b/redbeanpython/config.py index 6c8e5d7..fbbdb24 100644 --- a/redbeanpython/config.py +++ b/redbeanpython/config.py @@ -43,9 +43,9 @@ def migrations_directory(self) -> str: def _validate_dsn(self): dsn_driver = self.dsn.split(":")[0] - if dsn_driver not in ["sqlite", "mysql+pymysql", "postgresql+psycopg"]: + if dsn_driver not in ["sqlite", "mysql+pymysql", "postgresql+psycopg", "postgresql+psycopg2"]: raise ConfigurationError( - f"Unsupported driver: {dsn_driver}. Supported: 'sqlite', 'mysql+pymysql', 'postgresql+psycopg'" + f"Unsupported driver: {dsn_driver}. Supported: 'sqlite', 'mysql+pymysql', 'postgresql+psycopg', 'postgresql+psycopg2'" ) def _validate_directory(self): diff --git a/tests/run_compatibility_tests.py b/tests/run_compatibility_tests.py index 643866c..3a08909 100644 --- a/tests/run_compatibility_tests.py +++ b/tests/run_compatibility_tests.py @@ -19,6 +19,7 @@ "legacy (2022)": [ "SQLAlchemy==2.0.0", "psycopg==3.0.18", + "psycopg2==2.9.9", "PyMySQL==1.0.2", "alembic==1.8.0", ],