sqlMigrate : add --execute option to use the configuration file
This commit is contained in:
@@ -60,8 +60,11 @@ class main
|
|||||||
// Manage the Getopts
|
// Manage the Getopts
|
||||||
$getopts = new getopts ();
|
$getopts = new getopts ();
|
||||||
$getopts->add ("Help", "?h", array ("help"), "Help of the software");
|
$getopts->add ("Help", "?h", array ("help"), "Help of the software");
|
||||||
$getopts->add ("Step", "", array ("step:"), "Restart at provided step", "StepIdentifier");
|
$getopts->add ("Step", "", array ("step:"), "Restart at provided step",
|
||||||
|
"StepIdentifier");
|
||||||
$getopts->add ("Debug", "", array ("debug"), "Display the SQL requests");
|
$getopts->add ("Debug", "", array ("debug"), "Display the SQL requests");
|
||||||
|
$getopts->add ("Execute", "", array ("execute"),
|
||||||
|
"Execute the configuration without requesting data");
|
||||||
if ($getopts->get ("Help"))
|
if ($getopts->get ("Help"))
|
||||||
die ($getopts->help ());
|
die ($getopts->help ());
|
||||||
if ($getopts->get ("Step"))
|
if ($getopts->get ("Step"))
|
||||||
@@ -103,6 +106,8 @@ class main
|
|||||||
|
|
||||||
if ($getopts->get ("Step"))
|
if ($getopts->get ("Step"))
|
||||||
$step = intval ($getopts->get ("Step"));
|
$step = intval ($getopts->get ("Step"));
|
||||||
|
if ($getopts->get ("Execute"))
|
||||||
|
$step = 5;
|
||||||
|
|
||||||
if ($step === 0)
|
if ($step === 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user