Project

app_reset

0.0
No commit activity in last 3 years
No release in over 3 years
Resets (and if available, seeds) your development and test databases.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

>= 0
 Project Readme

AppReset

Why?

Compared to db:reset:

db:reset resets your database from schema.rb - during early stage of development, the migration files are often edited directly to keep the sanity.

Compared to db:migrate:reset:

AppReset always calls db:create to ensure databases exist, and then calls db:migrate:reset. It also ensures seeds.rb will get called if you are in a rails engine environment.

AppReset basically replaces the following steps:

  • db:create
  • db:migrate:reset
  • RAILS_ENV=test db:migrate:reset
  • run seeds.rb from your rails engine

Installation

It is recommended you only include app_reset in your development environment:

gem 'app_reset', :group => :development

If you are using it in a rails engine, don't forget to require it:

require 'app_reset' if Rails.env.development?

Usage

Resets (and if available, seeds) your development and test databases via:

rake app:reset

License

This gem is released under the MIT License.

Author

Fred Wu