Fix of #3957 bug to override _sql_constraints

We reverse the order in which you create the array sql_constraints