diff --git a/script/partitioning.pl b/script/partitioning.pl index c6b5379..a5cb754 100755 --- a/script/partitioning.pl +++ b/script/partitioning.pl @@ -16,6 +16,7 @@ while( $_ = shift @ARGV ) { my $tabella = "proxy_dati_storico"; my $tabella_orig = "proxy_dati"; my $campo = "data_destroy"; +my $limitgg = 30; open CONFFILE, "< $Bin/../core/config.php" or die ("Manca file di configurazione\n"); while () { @@ -126,7 +127,7 @@ sub aggiorna { $ultimo = "$1-$2-$3"; my $diff = diffgg ($ultimo); - if ($diff > 365) { + if ($diff > $limitgg) { my $query = "ALTER TABLE $tabella DROP PARTITION p$1"; $sts = $dbmysql->prepare($query); $sts->execute ();