Skip to content

Commit

Permalink
Upgrade to psycopg3 from version 2 (#201)
Browse files Browse the repository at this point in the history
## Ticket

#200

## Changes

Upgraded psycopg, the library that connects to Postgres for SQLAlchemy,
to version 3.

## Context for reviewers

Version 2 was named `psycopg2` but version 3 is just `psycopg` so that
they can upgrade without changing the package name moving forward.

Changing the connection string to `postgresql+psycopg` tells SQLAlchemy
internally to use the new library:
https://docs.sqlalchemy.org/en/20/dialects/postgresql.html#dialect-postgresql-psycopg-connect

Since we only have a few direct interactions with psycopg, the changes
were fairly minimal, just adjusting the DB connection info object
slightly.

## Testing

Migrations, unit tests, and other automations still running fine.

Was able to pull up swagger and read/write to the DB via our endpoints.
  • Loading branch information
chouinar authored Sep 22, 2023
1 parent bcaf0eb commit 86b19bd
Show file tree
Hide file tree
Showing 4 changed files with 108 additions and 72 deletions.
Loading

0 comments on commit 86b19bd

Please sign in to comment.