<?php require_once __DIR__ . '/../vendor/autoload.php'; require_once __DIR__ . '/../config/db.php'; echo "[0;36m --------------makeTable-----------------[0m\n"; echo "[0;36m --------------start-----------------[0m\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 "[0;36m --------------this is run message-----------------[0m\n"; if ($tablname != '*' and !empty($tablname)) { echo $callClass->runOne($tablname, $method); } else { echo $callClass->run($method); } echo "[0;36m--------------this is end message-----------------[0m\n"; echo 'finish......'; ?>
<?php require_once __DIR__ . '/../vendor/autoload.php'; require_once __DIR__ . '/../config/db.php'; echo "[0;36m --------------makeTable-----------------[0m\n"; echo "[0;36m --------------start-----------------[0m\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 "[0;36m --------------this is run message-----------------[0m\n"; if ($seedName != '*' and !empty($seedName)) { echo $callClass->runOne($seedName, $method); } else { echo $callClass->run($method); } echo "[0;36m--------------this is end message-----------------[0m\n"; echo 'finish......';