Fix failing tests in postgres.

This commit is contained in:
mark_story 2012-08-24 22:37:23 -04:00
parent b75a6b440a
commit b2f62f46c5

View file

@ -447,7 +447,7 @@ class DboSource extends DataSource {
*/
protected function _execute($sql, $params = array(), $prepareOptions = array()) {
$sql = trim($sql);
if (preg_match('/^(?:CREATE|ALTER|DROP)\s+TABLE/i', $sql)) {
if (preg_match('/^(?:CREATE|ALTER|DROP)\s+(?:TABLE|INDEX)/i', $sql)) {
$statements = array_filter(explode(';', $sql));
if (count($statements) > 1) {
$result = array_map(array($this, '_execute'), $statements);