public function wipe($table, $truncate) { $should_toggle_foreign_key = $this->isForeignKeyChecksEnabled(); if ($should_toggle_foreign_key) { $this->disableForeignKeyCheck(); } parent::wipe($table, $truncate); if ($should_toggle_foreign_key) { //re-enable $this->enableForeignKeyCheck(); } }
/** * Wipe all data in the data store for the provided table * @param string $table Name of table to delete all rows * @param bool $truncate SQLite does not support truncate */ public function wipe($table, $truncate) { return parent::wipe($table, false); }