xpdo
xpdo copied to clipboard
Fixes for sqlsrv compatibility
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