fixed SQL script so it won't overwrite existing