Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate DISTINCT ON warning #127

Open
AetherUnbound opened this issue May 20, 2022 · 1 comment
Open

Investigate DISTINCT ON warning #127

AetherUnbound opened this issue May 20, 2022 · 1 comment

Comments

@AetherUnbound
Copy link
Collaborator

We're receiving this warning in testing:

/usr/local/lib/python3.9/site-packages/flask_sqlalchemy/__init__.py:534
  /usr/local/lib/python3.9/site-packages/flask_sqlalchemy/__init__.py:534: SADeprecationWarning: DISTINCT ON is currently supported only by the PostgreSQL dialect.  Use of DISTINCT ON for other backends is currently silently ignored, however this usage is deprecated, and will raise CompileError in a future release for all backends that do not support this syntax.
    items = self.limit(per_page).offset((page - 1) * per_page).all()

This doesn't appear to be affecting anything...and I'm not sure what the workaround even is since we are using postgres 🤷‍♀️

@sea-kelp
Copy link
Collaborator

A lot of the sqlalchemy warnings seem to be related to the fact that we use sqlite in unit tests
https://github.com/OrcaCollective/OpenOversight/blob/main/OpenOversight/app/config.py#L64-L66

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants