Reminders to myself or whoever else ever looks in here...
SQLite needs some heavy refactoring, the subroutines are becoming too complex to understand easily.
-MySQL needs implicit FK support, I think.
Consider:
If local column is UNIQUE or PK, use has_one() for relation?