add wipe db script

This commit is contained in:
Yisroel Baum 2025-11-09 21:02:44 +02:00
parent b80eaa2a9f
commit 0400282b03
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
2 changed files with 13 additions and 1 deletions

View file

@ -4,6 +4,7 @@
},
"scripts": {
"cy:open": "cypress open",
"db:seed": "php storage/seedDb.php"
"db:seed": "php storage/seedDb.php",
"db:wipe": "php storage/wipeDb.php"
}
}

11
storage/wipeDb.php Normal file
View file

@ -0,0 +1,11 @@
<?php
$files = [
'users.json',
'carriers.json',
];
foreach ($files as $file) {
$path = __DIR__."/$file";
file_put_contents($path, json_encode([], JSON_PRETTY_PRINT));
}