Thanks Jarkko!
The original database is missing descriptions for some of the spell types (including fires from afar and charm), and thanks to how I joined stuff in my sql query those spells were simply dropped.
Rather than fix all the missing types of spells, I simply changed the query, so all spells should be there now - but some with empty spell types. Some day I will come up with names for them instead