CRAFTERCMS-136
Fixed SQL script syntax errors for Oracle and PostgreSQL