I have been reading questions on here from people having the same problem as me and not finding any sufficient answers. I modified my application.py with the following code as per recommendations on answers to others' questions:
# configure CS50 Library to use SQLite database
db = SQL("sqlite:///finance.db")
db.execute("PRAGMA foreign_keys = ON")
I'm not sure what this actually does as it changes nothing in phpLiteAdmin that I can tell. I get no option to make a column a foreign_key.