fixes for exporting indices
This commit is contained in:
parent
9b4f5db135
commit
dfdcf002a1
@ -471,7 +471,7 @@ class Doctrine_Export_Mysql extends Doctrine_Export
|
|||||||
public function createIndexSql($table, $name, array $definition)
|
public function createIndexSql($table, $name, array $definition)
|
||||||
{
|
{
|
||||||
$table = $table;
|
$table = $table;
|
||||||
$name = $this->conn->getIndexName($name);
|
$name = $this->conn->formatter->getIndexName($name);
|
||||||
$name = $this->conn->quoteIdentifier($name);
|
$name = $this->conn->quoteIdentifier($name);
|
||||||
$type = '';
|
$type = '';
|
||||||
if (isset($definition['type'])) {
|
if (isset($definition['type'])) {
|
||||||
@ -485,7 +485,7 @@ class Doctrine_Export_Mysql extends Doctrine_Export
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$query = 'CREATE ' . $type . 'INDEX ' . $name . ' ON ' . $table;
|
$query = 'CREATE ' . $type . 'INDEX ' . $name . ' ON ' . $table;
|
||||||
$query .= ' (' . $this->getIndexFieldDeclarationList() . ')';
|
$query .= ' (' . $this->getIndexFieldDeclarationList($definition['fields']) . ')';
|
||||||
|
|
||||||
return $query;
|
return $query;
|
||||||
}
|
}
|
||||||
|
@ -39,13 +39,13 @@ class Doctrine_Migration
|
|||||||
'dropped_fks' => array(),
|
'dropped_fks' => array(),
|
||||||
'created_fks' => array(),
|
'created_fks' => array(),
|
||||||
'dropped_constraints' => array(),
|
'dropped_constraints' => array(),
|
||||||
|
'removed_indexes' => array(),
|
||||||
'dropped_tables' => array(),
|
'dropped_tables' => array(),
|
||||||
'added_columns' => array(),
|
'added_columns' => array(),
|
||||||
'renamed_columns' => array(),
|
'renamed_columns' => array(),
|
||||||
'changed_columns' => array(),
|
'changed_columns' => array(),
|
||||||
'removed_columns' => array(),
|
'removed_columns' => array(),
|
||||||
'added_indexes' => array(),
|
'added_indexes' => array(),
|
||||||
'removed_indexes' => array()
|
|
||||||
),
|
),
|
||||||
$migrationTableName = 'migration_version',
|
$migrationTableName = 'migration_version',
|
||||||
$migrationClassesDirectory = array(),
|
$migrationClassesDirectory = array(),
|
||||||
@ -524,7 +524,7 @@ class Doctrine_Migration
|
|||||||
* @param string $array
|
* @param string $array
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function addIndex($tableName, $indexName, array $options = array())
|
public function addIndex($tableName, $indexName, array $definition)
|
||||||
{
|
{
|
||||||
$options = get_defined_vars();
|
$options = get_defined_vars();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user