Skip to content
Snippets Groups Projects
Commit d42039ed authored by Laurent's avatar Laurent
Browse files

dev #37760 add script to reset dilicom before going into production

parent 6b3b7b6d
Branches
Tags
7 merge requests!1587Master,!1553Master,!1519Master,!1506Master,!1502Master,!1491Master,!1477Dev#37760 mise en production de casa pnb
<?php
require(__DIR__.'/../console.php');
echo "\nDelete loans\n";
Class_Loan_Pnb::deleteBy([]);
array_map(function($album)
{
$album->unindex();
$album->delete();
echo "[DELETE] " . $album->getTitre() . "\n";
},
Class_Album::findAllBy(['type_doc_id' => Class_TypeDoc::DILICOM]));
echo "\nDelete remaining items\n";
Class_Album_Item::deleteBy([]);
echo "\nDelete remaining usage constraints\n";
Class_Album_UsageConstraint::deleteBy([]);
echo "\nClear cache\n";
(new Storm_Cache())->clean();
echo "\nDONE\n";
?>
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment