8000 Using cascade when truncating table in PostgreSQL (#26389) · laravel/framework@39237e5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 39237e5

Browse files
rymanalutaylorotwell
authored andcommitted
Using cascade when truncating table in PostgreSQL (#26389)
1 parent 9c737f8 commit 39237e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Illuminate/Database/Query/Grammars/PostgresGrammar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ protected function compileDeleteWithJoins($query, $table)
360360
*/
361361
public function compileTruncate(Builder $query)
362362
{
363-
return ['truncate '.$this->wrapTable($query->from).' restart identity' => []];
363+
return ['truncate '.$this->wrapTable($query->from).' restart identity cascade' => []];
364364
}
365365

366366
/**

0 commit comments

Comments
 (0)
0