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

Document how to delete all records from all tables #1510

Merged
merged 5 commits into from
Apr 15, 2021
Merged

Conversation

molebox
Copy link
Contributor

@molebox molebox commented Mar 31, 2021

This PR documents how to delete all records from all tables using postgres, sqlite and mysql. It gives an example for doing this with each database. The info is added to the CRUD page. Though this page might get split up into sections by operation later.

Fixes #451

@mhwelander
Copy link
Contributor

One other option that is already documented - use deleteMany in a particular order, run all queries in a transaction: https://www.prisma.io/docs/guides/prisma-guides/prisma-client-transactions-guide#scenario-privacy-legislation

@molebox molebox requested a review from mhwelander April 6, 2021 09:47
@mhwelander mhwelander added the docs Documentation creation, updates or corrections label Apr 14, 2021
@molebox molebox merged commit 0548375 into master Apr 15, 2021
@molebox molebox deleted the delete-all-records branch April 15, 2021 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation creation, updates or corrections
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document how to delete all records from all tables
3 participants