Let's be consistent with how foreign keys are defined. This one says column type None (which is recommended), but channel_id above says db.Integer. Change that?