Skip to content

Commit

Permalink
Using cascade when truncating table in PostgreSQL (#26389)
Browse files Browse the repository at this point in the history
  • Loading branch information
rymanalu authored and taylorotwell committed Nov 5, 2018
1 parent 9c737f8 commit 39237e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Database/Query/Grammars/PostgresGrammar.php
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ protected function compileDeleteWithJoins($query, $table)
*/
public function compileTruncate(Builder $query)
{
return ['truncate '.$this->wrapTable($query->from).' restart identity' => []];
return ['truncate '.$this->wrapTable($query->from).' restart identity cascade' => []];
}

/**
Expand Down

0 comments on commit 39237e5

Please sign in to comment.