Skip to content

Provide easy way to reset all data in databaseΒ #237

Closed as not planned
Closed as not planned

Description

@schickling
No description provided.

Activity

  1. changed the title [-]Provide easy way to reset all data[/-] [+]Provide easy way to reset all data in database[/+] on Oct 22, 2019
  2. added this to the milestone on Oct 22, 2019
  3. schickling commented on Nov 1, 2019

    @schickling
    MemberAuthor

    Here's an initial design proposal. It's not clear to me yet where the best location for this feature would be but this should get the ball rolling and unblock users. As part of #265 we should rethink this further.

    image

    Important: When clicking the button, the user should be prompted with a confirmation pop up.

  4. modified the milestones: , on Nov 1, 2019
  5. assigned and unassigned on Nov 1, 2019
  6. schickling commented on Nov 1, 2019

    @schickling
    MemberAuthor

    @madebysid can you implement the functionality for this yourself or does this depend on some (missing) SDK functionality?

  7. sdnts commented on Nov 1, 2019

    @sdnts

    It is possible, I'll run a deleteMany on all models.

  8. 1 remaining item

  9. modified the milestones: , on Jan 17, 2020
  10. modified the milestones: , on Mar 17, 2020
  11. matthewmueller commented on Mar 17, 2020

    @matthewmueller

    Personally, I'd prefer if we handle this in the CLI today with a workflow like prisma truncate <models...>

    Then when we go for it, we have the following UI:

    image

    Something to improve Soren's workflow is exporting the models from @prisma/client:

    import { PrismaClient, models } from "@prisma/client"
    const prisma = new PrismaClient()
    
    for (let model of models) {
      await prisma[model].deleteMany()
    }

    I also think with Migrate will cover this use case better.


    I'd very much prefer to leave this until post-Beta given that we have so many other fish to fry related to the databrowser.

  12. removed this from the milestone on Jun 15, 2020
  13. anasouardini commented on Aug 25, 2024

    @anasouardini

    This still open!!! We need a clearAllTables method.

  14. igalklebanov commented on Nov 20, 2025

    @igalklebanov

    Hey πŸ‘‹

    Prisma ORM 7 introduces a brand new standalone Studio, built from the ground up to work everywhere, with or without Prisma ORM. Consequently, all "old Studio" issues are being closed as there won't be any further work on it. πŸ“£

    The new Studio is also available in the Prisma VS Code extension and in the Prisma Console application. πŸ”Œ

    Help shape, improve and fix the new Studio with us in this repository by submitting bug reports and feature requests. πŸ‘·

  15. locked and limited conversation to collaborators on Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions