diff --git a/tools/sqlMigrate.php b/tools/sqlMigrate.php index e00a891..9b51119 100755 --- a/tools/sqlMigrate.php +++ b/tools/sqlMigrate.php @@ -61,6 +61,7 @@ class main $getopts = new getopts (); $getopts->add ("Help", "?h", array ("help"), "Help of the software"); $getopts->add ("Step", "", array ("step:"), "Restart at provided step", "StepIdentifier"); + $getopts->add ("Debug", "", array ("debug"), "Display the SQL requests"); if ($getopts->get ("Help")) die ($getopts->help ()); if ($getopts->get ("Step")) @@ -327,12 +328,15 @@ class main $dstDB->primary ($dstSchema["primary"]); foreach ($srcDB->directQuery ($sql) as $row) { - echo "."; //print_r ($row); $dstDB->clearRequest (); $dstDB->insert () - ->setValues ($row) - ->execute (); + ->setValues ($row); + if (! $getopts->get ("Debug")) + echo "."; + else + echo $dstDB->getDisplayQuery (); + $dstDB->execute (); } echo "\n"; }