Add check constraints to all repo methods (as needed) to validated the types and encoding is valid to write to the database. Prevent the database from refusing by blocking a connection.