Is there a way to programmatically alter a field's schema?
I believe you are looking for the API function hook_schema_alter.

Though you should also be aware that the Media module exists specifically to solve this particular problem in a much nicer way.