updated sql scripts: