Skip to main content

For Ruby on Rails, what's the best way to delete the database records?



  • Ori Pekelman

    Safety first, so please create a backup as your first step.

    Then, And yes rake db:reset will drop all tables, it is the clean way to do this.

    I believe you can also do rake db:migrate:reset, which does a reset + a migrate…

  • Larry

    You could also rename the service in services.yaml and the reference to it in That will give you a “new” service with no data in it, discarding the old one.

    And then just do the table-create/insert command (presumably rake db:migrate ).

  • DevRel

    thanks my issue has been fixed.


Please sign in to leave a comment.