Conversation
nfq2
left a comment
There was a problem hiding this comment.
i left a couple of comments for small fixes. also, since ur changing the database and adding a new table you need to add a migration (tells our database what changes it needs to make). u can prob just ask chatgpt how to do this since i'm not 100% what the commands are but try:
generate migration file: alembic revision --autogenerate -m "add <table>"
syncs ur DB and apply changes to ur db: alembic upgrade head
push the new changes it added to ur branch as well (migrations/versions)
you might also wanna do some testing by creating new challenges and seeing if you can get them using ur endpoint
|
Note: Because we are using a GraphQL API, we don't need a serialize function, as the serialization is implemented on a field-level in the |
Title
Added weekly_challenge table and query by date
Overview
Added table weekly_challenge.py in data base and added query get_weekly_challenge_by_date and added but commented out CreateWeeklyChallenge
Changes Made
I populated weekly_challenge table with name, message, start_date, and end_date, added serialize, and added query get_weekly_challenge_by_date
Test Coverage
Tested locally