Skip to content

Instantly share code, notes, and snippets.

@zulhfreelancer
Created October 2, 2015 16:15
Show Gist options
  • Save zulhfreelancer/a13cd9403f002053cf39 to your computer and use it in GitHub Desktop.
Save zulhfreelancer/a13cd9403f002053cf39 to your computer and use it in GitHub Desktop.
Delete all tables data and recreate tables in Rails

You can have finer control with:

rake db:drop:all

And then create the database without running the migrations:

rake db:create:all

Then run all your migrations:

rake db:migrate

If you have some seeds data, run:

rake db:seed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment