mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR Revert changes for 5.4
This commit is contained in:
parent
f30a3bd760
commit
56e75b4486
@ -230,9 +230,9 @@ abstract class SS_Database {
|
||||
* Returns true if schema modifications were requested after a beginSchemaUpdate() call.
|
||||
*/
|
||||
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
|
||||
|
||||
/**
|
||||
|
@ -35,9 +35,10 @@ class MySQLDatabaseTest extends SapphireTest {
|
||||
$db->beginSchemaUpdate();
|
||||
$obj = new MySQLDatabaseTest_DO();
|
||||
$obj->requireTable();
|
||||
$this->assertTrue($db->doesSchemaNeedUpdating());
|
||||
$needsUpdating = $db->doesSchemaNeedUpdating();
|
||||
$db->cancelSchemaUpdate();
|
||||
$this->assertFalse($db->doesSchemaNeedUpdating());
|
||||
|
||||
$this->assertFalse($needsUpdating);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user