Unverified Commit 716828db authored by alexpott's avatar alexpott

Issue #2996560 by petiar, mondrake, andypost: MySql Schema::renameTable is...

Issue #2996560 by petiar, mondrake, andypost: MySql Schema::renameTable is wrongly returning a value
parent 69a3c90c
......@@ -388,7 +388,7 @@ public function renameTable($table, $new_name) {
}
$info = $this->getPrefixInfo($new_name);
return $this->connection->query('ALTER TABLE {' . $table . '} RENAME TO `' . $info['table'] . '`');
$this->connection->query('ALTER TABLE {' . $table . '} RENAME TO `' . $info['table'] . '`');
}
/**
......
......@@ -128,7 +128,7 @@ public function testSchema() {
$this->assertIdentical($index_exists, TRUE, 'Index created.');
// Rename the table.
$this->schema->renameTable('test_table', 'test_table2');
$this->assertNull($this->schema->renameTable('test_table', 'test_table2'));
// Index should be renamed.
$index_exists = $this->schema->indexExists('test_table2', 'test_field');
......@@ -240,7 +240,7 @@ public function testSchema() {
$this->assertIdentical($primary_key_exists, TRUE, 'Primary key created.');
$this->assertIdentical($unique_key_exists, TRUE, 'Unique key created.');
$this->schema->renameTable('test_table', 'test_table2');
$this->assertNull($this->schema->renameTable('test_table', 'test_table2'));
// Test for renamed primary and unique keys.
switch ($db_type) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment