Modified sql scripts