From 556fb57233fadd2868e6702f692fffe10dc2d5cc Mon Sep 17 00:00:00 2001 From: Dominique FOURNIER Date: Tue, 16 Mar 2021 15:38:21 +0100 Subject: [PATCH] sqlMigrate : add --execute option to use the configuration file --- tools/sqlMigrate.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/sqlMigrate.php b/tools/sqlMigrate.php index 9b51119..6adf91b 100755 --- a/tools/sqlMigrate.php +++ b/tools/sqlMigrate.php @@ -60,8 +60,11 @@ class main // Manage the Getopts $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 ("Step", "", array ("step:"), "Restart at provided step", + "StepIdentifier"); $getopts->add ("Debug", "", array ("debug"), "Display the SQL requests"); + $getopts->add ("Execute", "", array ("execute"), + "Execute the configuration without requesting data"); if ($getopts->get ("Help")) die ($getopts->help ()); if ($getopts->get ("Step")) @@ -103,6 +106,8 @@ class main if ($getopts->get ("Step")) $step = intval ($getopts->get ("Step")); + if ($getopts->get ("Execute")) + $step = 5; if ($step === 0) {