mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Improved db/build output for CLI
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60603 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
45ee7149d7
commit
cad5130fb5
@ -161,7 +161,8 @@ class DatabaseAdmin extends Controller {
|
||||
array_shift($dataClasses);
|
||||
|
||||
if(!$quiet) {
|
||||
echo '\n<p><b>Creating database tables</b></p>\n\n';
|
||||
if(Director::is_cli()) echo "\nCREATING DATABASE TABLES\n\n";
|
||||
else echo "\n<p><b>Creating database tables</b></p>\n\n";
|
||||
}
|
||||
|
||||
$conn->beginSchemaUpdate();
|
||||
@ -169,7 +170,8 @@ class DatabaseAdmin extends Controller {
|
||||
$SNG = singleton($dataClass);
|
||||
if($testMode || !($SNG instanceof TestOnly)) {
|
||||
if(!$quiet) {
|
||||
echo "<li>$dataClass</li>\n";
|
||||
if(Director::is_cli()) echo " * $dataClass\n";
|
||||
else echo "<li>$dataClass</li>\n";
|
||||
}
|
||||
$SNG->requireTable();
|
||||
}
|
||||
@ -180,7 +182,8 @@ class DatabaseAdmin extends Controller {
|
||||
|
||||
if($populate) {
|
||||
if(!$quiet) {
|
||||
echo '\n<p><b>Creating database records</b></p>\n\n';
|
||||
if(Director::is_cli()) echo "\nCREATING DATABASE RECORDS\n\n";
|
||||
else echo "\n<p><b>Creating database records</b></p>\n\n";
|
||||
}
|
||||
|
||||
foreach($dataClasses as $dataClass) {
|
||||
@ -188,7 +191,8 @@ class DatabaseAdmin extends Controller {
|
||||
|
||||
if(strpos($dataClass,'Test_') === false) {
|
||||
if(!$quiet) {
|
||||
echo "<li>$dataClass</li>\n";
|
||||
if(Director::is_cli()) echo " * $dataClass\n";
|
||||
else echo "<li>$dataClass</li>\n";
|
||||
}
|
||||
|
||||
singleton($dataClass)->requireDefaultRecords();
|
||||
|
Loading…
Reference in New Issue
Block a user