Skip to content

Commit

Permalink
Merge pull request #35 from beingjungshahi/master
Browse files Browse the repository at this point in the history
Fix mysql foreign check error in pgsql connection
  • Loading branch information
igaster authored Jul 3, 2020
2 parents 8dd5fd5 + 733ec53 commit a95d695
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/commands/seedGeoFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,10 @@ public function handle()
// Store Tree in DB
//$this->writeToDb();

//Lets get back FOREIGN_KEY_CHECKS to laravel
DB::statement('SET FOREIGN_KEY_CHECKS=1;');
//Lets get back MySQL FOREIGN_KEY_CHECKS to laravel
if(DB::connection()->getDriverName() === 'mysql') {
DB::statement('SET FOREIGN_KEY_CHECKS=1;');
}

$this->info(PHP_EOL . ' Relation checks enabled');

Expand Down

0 comments on commit a95d695

Please sign in to comment.