Modify the sql and add the models