update sql and fix .sql file