Skip to content

Commit

Permalink
[8.x] Clarify cascading truncate in PostgreSQL (#6560)
Browse files Browse the repository at this point in the history
* Clarify cascading truncate in PostgreSQL

* Update queries.md

Co-authored-by: Taylor Otwell <[email protected]>
  • Loading branch information
driesvints and taylorotwell authored Nov 10, 2020
1 parent c742469 commit d06428a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,11 @@ If you wish to truncate the entire table, which will remove all rows and reset t

DB::table('users')->truncate();

<a name="table-truncation-and-postgresql"></a>
#### Table Truncation & PostgreSQL

When truncating a PostgreSQL database, the `CASCADE` behavior will be applied. This means that all foreign key related records in other tables will be deleted as well.

<a name="pessimistic-locking"></a>
## Pessimistic Locking

Expand Down

0 comments on commit d06428a

Please sign in to comment.