Repaired factory generation for text database fields