updated sql queries for update & installation