Skip to content

Commit

Permalink
fixed pgsql test break
Browse files Browse the repository at this point in the history
  • Loading branch information
cebe committed Jan 28, 2014
1 parent b06792d commit 81dea0e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions framework/db/schema/pgsql/CPgsqlSchema.php
Expand Up @@ -419,16 +419,17 @@ public function alterColumn($table, $column, $type)
* Builds a SQL statement for creating a new index.
* @param string $name the name of the index. The name will be properly quoted by the method.
* @param string $table the table that the new index will be created for. The table name will be properly quoted by the method.
* @param string $column the column(s) that should be included in the index. If there are multiple columns, please separate them
* @param string $columns the column(s) that should be included in the index. If there are multiple columns, please separate them
* by commas. Each column name will be properly quoted by the method, unless a parenthesis is found in the name.
* @param boolean $unique whether to add UNIQUE constraint on the created index.
* @return string the SQL statement for creating a new index.
* @since 1.1.6
*/
public function createIndex($name, $table, $column, $unique=false)
public function createIndex($name, $table, $columns, $unique=false)
{
$cols=array();
$columns=preg_split('/\s*,\s*/',$column,-1,PREG_SPLIT_NO_EMPTY);
if (is_string($columns))
$columns=preg_split('/\s*,\s*/',$columns,-1,PREG_SPLIT_NO_EMPTY);
foreach($columns as $col)
{
if(strpos($col,'(')!==false)
Expand Down

0 comments on commit 81dea0e

Please sign in to comment.