Skip to content

Conversation

@ramonechen
Copy link
Contributor

What?

Refactors the API service to use the new database models defined at https://github.com/Project-CARPI/database-schema, which also includes a refactor from using SQLModel to SQLAlchemy.

Closes #13 and #3.

Why?

We are abandoning the old database models and need to integrate the new ones into the API.

How?

We first refactored the code to use SQLAlchemy instead of SQLModel as the new database models were written with SQLAlchemy. Then we did a bit of tinkering to preserve the old query behavior.

Testing?

We tested all of the endpoints via Postman and they all work.

Anything Else?

Have a nice day.

@ramonechen ramonechen requested a review from jzgom067 November 14, 2025 22:30
@ramonechen ramonechen added the API Related to the API label Nov 14, 2025
@ramonechen ramonechen changed the base branch from main to main-preview November 14, 2025 22:30
@jzgom067 jzgom067 merged commit eba9701 into main-preview Nov 14, 2025
2 checks passed
@jzgom067 jzgom067 deleted the refactor-database-model branch November 14, 2025 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API Related to the API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor API to use new database schema

3 participants