diff --git a/app/Console/Commands/ImportUlbXmlData.php b/app/Console/Commands/ImportUlbXmlData.php index 85f752c..c998060 100644 --- a/app/Console/Commands/ImportUlbXmlData.php +++ b/app/Console/Commands/ImportUlbXmlData.php @@ -4,6 +4,7 @@ namespace App\Console\Commands; use App\Handlers\UlbXmlImportHandler; use Illuminate\Console\Command; +use Illuminate\Support\Facades\DB; class ImportUlbXmlData extends Command { @@ -38,6 +39,13 @@ class ImportUlbXmlData extends Command */ public function handle() { + DB::statement("SET FOREIGN_KEY_CHECKS=0"); + DB::table('verses')->truncate(); + DB::table('chapters')->truncate(); + DB::table('books')->truncate(); + DB::table('words')->truncate(); + DB::statement("SET FOREIGN_KEY_CHECKS=1"); + $importHandler = new UlbXmlImportHandler(); $importHandler->run(); } diff --git a/tests/Unit/ExampleTest.php b/tests/Unit/ExampleTest.php deleted file mode 100644 index 358cfc8..0000000 --- a/tests/Unit/ExampleTest.php +++ /dev/null @@ -1,18 +0,0 @@ -assertTrue(true); - } -}