xpdo icon indicating copy to clipboard operation
xpdo copied to clipboard

Fixes for sqlsrv compatibility

Open davidpede opened this issue 6 years ago • 0 comments

Summary

Gets writeSchema() working and addresses issue with escaped table prefixes/names format in queries for sqlsrv.

Reason

Schema file generation and all queries using a model were failing.

Notes

This is a first attempt to fix sqlsrv compatibility so all comments welcome.

Due to the table prefix/name escaping required for sqlsrv, currently you need to specify a $tablePrefix and set $restrictPrefix to true in the writeSchema() call. Then set the table prefix in your setPackage() call. This could be improved.

Environment

Database:

  • MS SQL Server 2008 R2

Application:

  • Centos 7
  • PHP Version 7.0.30
  • PDO driver: sqlsrv

davidpede avatar May 15 '18 13:05 davidpede