kjeverson / NFLDraftTracker

NFL Draft Tracker using Python, Flask, and SQLite
0 stars 0 forks source link

Add Needs and Drafted Positions to DB #3

Closed kjeverson closed 4 months ago

kjeverson commented 4 months ago

Sloppy DB management created this problem, I could at it manually, but don't know the best way to store it at the moment. This works with how it is implemented now, and is relatively easy to change, but I should store it/manage it better moving forward.

kjeverson commented 4 months ago

Drafted positions gets recalculated and updated whenever the team control is switched. This seems to work well, maybe add needs to the DB, but not sure if it needs to happen anymore - unless we build something that allows a user to change them within the app, I think the current implementation works well enough.

kjeverson commented 4 months ago

Needs are now stored as a string of positions, with each position separated by a space. A Simple split() on the team's needs (NFLTeam.needs.split() or the method NFLTeam.get_needs()) string will return a list of positions of need like how it was originally handled (Commit #c821bf1). One thing to note, this will break all of the current database snapshots - will need to reupload those in the future.