Removed “resurrect” option and references to Instances.Dead
This commit is contained in:
parent
d18775fd52
commit
ebc458cc2c
1 changed files with 1 additions and 14 deletions
|
@ -22,11 +22,9 @@ require(__DIR__.'/lib/delinstbyid.php');
|
|||
$opts=array(
|
||||
'shuffle'=>false,
|
||||
'updstats'=>false,
|
||||
// Warning reminder: don't "clean" InstChecks table because its data is necessary to determine if an instance is dead
|
||||
'clean'=>false,
|
||||
'clean_before_weeks'=>24,
|
||||
'deleteinstswhere'=>false,
|
||||
'resurrect'=>false,
|
||||
'optimize'=>false
|
||||
);
|
||||
|
||||
|
@ -40,7 +38,7 @@ $help='mustool.php
|
|||
First it returns a list of Instances records matching “condition”, then
|
||||
lets you choose whether you want to delete them and all records referencing
|
||||
them in other tables.
|
||||
Example: mustool.php deleteinstswhere "Dead=1"
|
||||
Example: mustool.php deleteinstswhere "IsMastodon!=1"
|
||||
shuffle
|
||||
Randomizes instances list (values in «RPos» column).
|
||||
updstats
|
||||
|
@ -48,8 +46,6 @@ $help='mustool.php
|
|||
clean
|
||||
Deletes records older than '.$opts['clean_before_weeks'].' weeks from
|
||||
«Notifications» table.
|
||||
resurrect
|
||||
Sets «Dead=0» on all «Instances» records.
|
||||
optimize
|
||||
Optimizes all the tables in the database.
|
||||
OPTIONS
|
||||
|
@ -88,9 +84,6 @@ for ($i=1; $i<$argc; $i++) {
|
|||
} elseif ($argv[$i]=='clean') {
|
||||
$dosome=true;
|
||||
$opts['clean']=true;
|
||||
} elseif ($argv[$i]=='resurrect') {
|
||||
$dosome=true;
|
||||
$opts['resurrect']=true;
|
||||
} elseif ($argv[$i]=='optimize') {
|
||||
$dosome=true;
|
||||
$opts['optimize']=true;
|
||||
|
@ -229,12 +222,6 @@ if ($opts['clean']) {
|
|||
echo('Done! Affected rows: '.mysqli_affected_rows($link).'.'.N);
|
||||
}
|
||||
|
||||
if ($opts['resurrect']) {
|
||||
echo('Setting «Dead=0» for records with «Dead!=0»...'.N);
|
||||
$res=myq($link,'UPDATE Instances SET Dead=0 WHERE Dead!=0');
|
||||
echo('Done! Affected rows: '.mysqli_affected_rows($link).'.'.N);
|
||||
}
|
||||
|
||||
if ($opts['optimize']) {
|
||||
echo('Optimizing all the tables in the database...'.N);
|
||||
$res=myq($link,'SHOW TABLES');
|
||||
|
|
Loading…
Reference in a new issue