more SQL fixes, remove not null oncstraint for varchar