Differential D19119 Diff 45818 src/applications/fact/management/PhabricatorFactManagementDestroyWorkflow.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/fact/management/PhabricatorFactManagementDestroyWorkflow.php
Show All 17 Lines | $question = pht( | ||||
'analysis, which may take some time.'); | 'analysis, which may take some time.'); | ||||
$ok = $console->confirm($question, $default = false); | $ok = $console->confirm($question, $default = false); | ||||
if (!$ok) { | if (!$ok) { | ||||
return 1; | return 1; | ||||
} | } | ||||
$tables = array(); | $tables = array(); | ||||
$tables[] = new PhabricatorFactRaw(); | $tables[] = new PhabricatorFactCursor(); | ||||
$tables[] = new PhabricatorFactAggregate(); | |||||
$tables[] = new PhabricatorFactIntDatapoint(); | |||||
$tables[] = new PhabricatorFactObjectDimension(); | |||||
$tables[] = new PhabricatorFactKeyDimension(); | |||||
foreach ($tables as $table) { | foreach ($tables as $table) { | ||||
$conn = $table->establishConnection('w'); | $conn = $table->establishConnection('w'); | ||||
$name = $table->getTableName(); | $name = $table->getTableName(); | ||||
$console->writeOut("%s\n", pht("Destroying table '%s'...", $name)); | $console->writeOut("%s\n", pht("Destroying table '%s'...", $name)); | ||||
queryfx( | queryfx( | ||||
$conn, | $conn, | ||||
'TRUNCATE TABLE %T', | 'TRUNCATE TABLE %T', | ||||
$name); | $name); | ||||
} | } | ||||
$console->writeOut("%s\n", pht('Done.')); | $console->writeOut("%s\n", pht('Done.')); | ||||
} | } | ||||
} | } |