sql writer - constraint naming rules converted to trait