Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed pgsql test break

  • Loading branch information...
commit 81dea0e51cafd27e848d34c905c98f63fa8d6a05 1 parent b06792d
@cebe cebe authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 framework/db/schema/pgsql/CPgsqlSchema.php
View
7 framework/db/schema/pgsql/CPgsqlSchema.php
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.