Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.x] Revert cascading truncations #34496

Merged
merged 1 commit into from Sep 23, 2020
Merged

Conversation

blakethepatton
Copy link
Contributor

This PR reverses #26389 which introduces cascading truncations in postgres. The spirit of the original fix was to address a constraint of postgres in that disabling foreign key constrains does not allow a developer to a truncate a table that has foreign keys. However, the proposed and accepted solution results in all tables that have a column that references the table under question for truncation to be also truncated and further any tables that referenced the children of the first table. This can and has created a problematic situation when you discover that truncating a small table results in the loss of your entire database.

As that is not expected behavior for truncation of a table, I would propose that the word cascading be removed from truncation and that documentation be created in the laravel docs indicating that this was the behavior in postgres between version [initial release version] and [this release version].

Issue: #29506

@blakethepatton
Copy link
Contributor Author

Thanks @GrahamCampbell and @rimace for the instructions on submitting a PR

@GrahamCampbell
Copy link
Member

This has been reverted again.

@blakethepatton
Copy link
Contributor Author

This has been reverted again.

Any reason why?

@blakethepatton blakethepatton changed the title Revert cascading truncations [6.x] Revert cascading truncations Sep 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants