Enable CakePHP ORM to accept SQL schema

Enable CakePHP ORM to accept PostgreSQL and SQL Server schema (Issue #3914)
The spacing is inconsistent and missing braces.