Migrating primary keys of a big table around which basically everything revolves around to a new datatype is painful ...
Moral of the story: Don't use TEXT for primary keys