Add nullable=false to user.username.  Unique nullable columns tend to give unexpected behaviour...