forgot a foreign key
[WIP] move SQL queries to new schema