check_for_entry() checks if a tool is already in our db, and does nothing if it is. If it's not, it inserts it into the tools table, unless the tool is deprecated. However, a tool could already be in our db, but with outdated info. The current workflow doesn't update existing tool records.
Suggestion:
- Remove the check_for_entry() function altogether
- Create an is_deprecated(tool) function that returns a boolean
- Refactor (and rename) add_tool_entry() so that it does an "upsert", i.e. insert or update, see info here: https://docs.sqlalchemy.org/en/20/dialects/mysql.html#insert-on-duplicate-key-update-upsert
- Use is_deprecated(tool) inside this new function to check for deprecation