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

Upgrade database libraries #41

Merged
merged 10 commits into from
Dec 8, 2024
Merged

Conversation

obscurerichard
Copy link
Member

@obscurerichard obscurerichard commented Dec 7, 2024

  • Upgraded SQLAlchemy, Geoalchemy, and Alembic
  • Added better database initialization scripts
  • Out with Powershell, in with Python for bin/registrations.py

Resolves freezingsaddles/freezing-web#295
Resolves freezingsaddles/freezing-sync#56
relates to #12 - this is almost there now...

These are all current with the released versions.

Added database reset scripts and test scripts.
Thanks GitHub Copilot for the boost

Protect against SQL injection also
Going all the way to SQLAlchemy 2.0 might be too ambitious as a first
step, see https://docs.sqlalchemy.org/en/20/changelog/migration_20.html
it was causing an error:
```
sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (1252, 'All parts of a SPATIAL index must be NOT NULL')
[SQL: CREATE INDEX idx_ride_geo_end_geo ON ride_geo (end_geo)]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
```
@obscurerichard obscurerichard marked this pull request as ready for review December 8, 2024 02:32
@obscurerichard
Copy link
Member Author

Resolves freezingsaddles/freezing-web#295
relates to #12 - this is almost there now...

@obscurerichard obscurerichard merged commit d51c078 into master Dec 8, 2024
3 checks passed
@obscurerichard obscurerichard deleted the upgrade-database-libraries branch December 8, 2024 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
1 participant