On Oct 22, 2007, at 6:03 PM, [email protected] wrote:
schema, and recreate it.
“rake db:migrate VERSION=0”
Editing a migration doesn’t change the version number that the system
thinks the schema is right now.
In any case, you probably need to do this manually. If the target
machine is some type of POSIX (unix, etc.), you can probably do:
env RAILS_ENV=production rake db:migrate VERSION=x
To force a migration to ‘x’ from wherever you are now.
You can try to do this with:
cap invoke COMMAND=“env RAILS_ENV=production rake db:migrate
It might be that you want the ROLES=db, but if you have everything on
a single host, that doesn’t matter anyway (you could replace ROLES=db
with HOST=yourhost.com if you want/need to be specific).
I think this works with both cap1.x and cap2.0, but I’m just typing,
not testing, so your results may vary. (Since you want to wipe the
database, I feel fairly safe suggesting that you try it.)
Rob B. http://agileconsultingllc.com