Closed duffn closed 2 years ago
First, thanks for the package.
This does not work with PostgreSQL if truncate is set to true. PostgreSQL does not have a FOREIGN_KEY_CHECKS configuration option. https://github.com/jeroenzwart/laravel-csv-seeder/blob/4c6746c4af83437809d623b0dd133884eccd3946/src/CsvSeeder.php#L282-L291
truncate
true
FOREIGN_KEY_CHECKS
This is the error received:
SQLSTATE[42704]: Undefined object: 7 ERROR: unrecognized configuration parameter "foreign_key_checks" (SQL: SET FOREIGN_KEY_CHECKS = 0;)
The workaround is to set $this->truncate = false; in the seeder.
$this->truncate = false;
First, thanks for the package.
This does not work with PostgreSQL if
truncate
is set totrue
. PostgreSQL does not have aFOREIGN_KEY_CHECKS
configuration option. https://github.com/jeroenzwart/laravel-csv-seeder/blob/4c6746c4af83437809d623b0dd133884eccd3946/src/CsvSeeder.php#L282-L291This is the error received:
The workaround is to set
$this->truncate = false;
in the seeder.