I think I can fix this.
[1]: https://sqlite.org/syntax/foreign-key-clause.html
[2]: https://sqlite.org/foreignkeys.html