Skip to content
This repository has been archived by the owner on Mar 4, 2021. It is now read-only.

MS SQL Server Support

Gipetto edited this page Jun 22, 2011 · 2 revisions

The beginnings of adding support for Microsoft SQL Server.

TODO

  1. here it appears that we're calling get_query_messages more than once and I'm not sure why.
    https://github.com/twilio/OpenVBX/blob/master/OpenVBX/models/vbx_message.php#L370
  2. We need to get rid of this IF syntax because it's not supported in SQL Server. We could switch to CASE or we could refactor the model to not do such crazy SQL at all... also on line 328 in this file there's a 1=1 that doesn't work in SQL Server either.
    https://github.com/twilio/OpenVBX/blob/master/OpenVBX/models/vbx_message.php#L331
  3. There are places in the code where we use a literal SQL value of UTC_TIMESTAMP() which also doesn't work in SQL Server. We should generate these time stamps in PHP land and just insert them probably.
  4. in the MY_Model class I added a line to the update function that removes the 'id' value from the $params array because SQL Server complains about trying to update an identity column...
    https://github.com/twilio/OpenVBX/blob/master/OpenVBX/libraries/MY_Model.php#L191
  5. There's also places where queries are run repeatedly. I modified the driver file to log all queries it was asked to execute and it was alarming. anything we can do to minimize that will help performance of the application greatly.

Done (with how and why)

Clone this wiki locally