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

What’s the best way to wipe my DB? I have a live ruby on rails site. I would like to purge or delete the data from the master branch Posgres database. I’d like to keep the tables intact, and only delete the rows from each. This is so that I can start my site development anew. My thinking is to change to the master branch in command line then following the reference below I would proceed with the command $ rake db:reset db:migrate Which will reset the database and reload the current schema. Is this best way as its my first in production site no account or customers to worry about?

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…

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 ).

thanks my issue has been fixed.