#3880 done generating all the sql. just lack triggers