mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Revert changes for 5.4
This commit is contained in:
parent
f30a3bd760
commit
56e75b4486
@ -230,7 +230,7 @@ abstract class SS_Database {
|
|||||||
* Returns true if schema modifications were requested after a beginSchemaUpdate() call.
|
* Returns true if schema modifications were requested after a beginSchemaUpdate() call.
|
||||||
*/
|
*/
|
||||||
function doesSchemaNeedUpdating() {
|
function doesSchemaNeedUpdating() {
|
||||||
return ($this->schemaUpdateTransaction === null) ? false : true;
|
return (bool)$this->schemaUpdateTransaction;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Transactional schema altering functions - they don't do anyhting except for update schemaUpdateTransaction
|
// Transactional schema altering functions - they don't do anyhting except for update schemaUpdateTransaction
|
||||||
|
@ -35,9 +35,10 @@ class MySQLDatabaseTest extends SapphireTest {
|
|||||||
$db->beginSchemaUpdate();
|
$db->beginSchemaUpdate();
|
||||||
$obj = new MySQLDatabaseTest_DO();
|
$obj = new MySQLDatabaseTest_DO();
|
||||||
$obj->requireTable();
|
$obj->requireTable();
|
||||||
$this->assertTrue($db->doesSchemaNeedUpdating());
|
$needsUpdating = $db->doesSchemaNeedUpdating();
|
||||||
$db->cancelSchemaUpdate();
|
$db->cancelSchemaUpdate();
|
||||||
$this->assertFalse($db->doesSchemaNeedUpdating());
|
|
||||||
|
$this->assertFalse($needsUpdating);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user