Esempio n. 1
0
<?php

require_once __DIR__ . '/../vendor/autoload.php';
require_once __DIR__ . '/../config/db.php';
echo " --------------makeTable-----------------\n";
echo " --------------start-----------------\n";
fwrite(STDOUT, "if you want to set by yourself?( {tableName}/* )");
$tablname = trim(fgets(STDIN));
fwrite(STDOUT, "which table type do you set?(up/down)");
$method = trim(fgets(STDIN));
$callClass = new \database\CallDatabaseClass();
$callClass->setRunWhich('tables');
echo " --------------this is run message-----------------\n";
if ($tablname != '*' and !empty($tablname)) {
    echo $callClass->runOne($tablname, $method);
} else {
    echo $callClass->run($method);
}
echo "--------------this is end message-----------------\n";
echo 'finish......';
?>

Esempio n. 2
0
<?php

require_once __DIR__ . '/../vendor/autoload.php';
require_once __DIR__ . '/../config/db.php';
echo " --------------makeTable-----------------\n";
echo " --------------start-----------------\n";
fwrite(STDOUT, "if you want to set by yourself?( {seedName}/* )");
$seedName = trim(fgets(STDIN));
fwrite(STDOUT, "which seed type do you set?(run/truncate)");
$method = trim(fgets(STDIN));
$callClass = new \database\CallDatabaseClass();
$callClass->setRunWhich('seeds');
echo " --------------this is run message-----------------\n";
if ($seedName != '*' and !empty($seedName)) {
    echo $callClass->runOne($seedName, $method);
} else {
    echo $callClass->run($method);
}
echo "--------------this is end message-----------------\n";
echo 'finish......';