RAILS_ENV=production rake db:reset ?

1,143 views
Skip to first unread message

prlawrence

unread,
May 29, 2009, 9:59:01 PM5/29/09
to Gitorious
I'd like to reset my production database (now that I'm starting to
understand what's really going on :-).

This command showed me what looks like quite a few options:
/var/www/gitorious> fgrep -R 'db:' .

Will RAILS_ENV=production rake db:reset get me back to square one,
where I want to be?

Phil Lawrence

Marius Mårnes Mathiesen

unread,
May 30, 2009, 2:43:18 AM5/30/09
to gito...@googlegroups.com
On 30. mai. 2009, at 03.59, prlawrence wrote:

> Will RAILS_ENV=production rake db:reset get me back to square one,
> where I want to be?

Yes, it should. Running rake -T db (show tasks containing "db" in the
task name) displays this:

rake db:reset Drops and recreates the database from db/schema.rb for
the current environment

db/schema.rb is a Ruby file containing the database schema (and
generated whenever you do a rake db:migrate), so this should give you
a database with a schema, but no data.

Good luck!
- Marius

Reply all
Reply to author
Forward
0 new messages