small medium large xlarge

28555da_pragsmall
06 Jan 2009, 20:15
David Wilbur (49 posts)

re: b1_8, version (2.2.2) of rails etc

according to page 301 top of page this should work:

rake db:migrate redo (in ({path}/awdwr_v3/work/depot) rake aborted! Don’t know how to build task ‘redo’

(See full trace by running task with –trace)

tbh, i have never done a redo before… i was using version=x, so it was news to me that worked. it would be nice not having to look up the last version since the numbers are not simple now.

also, page 81 where you introduce a real use of table alteration adding a price to product. it might be nice to have a footnote that actually talks about or points to page 301 “here is how you can redo this if you made a mistake, say with the default value or something” vs the scorched earth tactic of version 0.

Samr_small_pragsmall
06 Jan 2009, 20:45
Sam Ruby (634 posts)

Try rake db:migrate:redo. I’ll fix that for the next beta.

How about I simply replace db:migrate VERSION=0 with db:migrate:redo in the sidebar on page 69?

28555da_pragsmall
06 Jan 2009, 21:18
David Wilbur (49 posts)

yep that worked. thanks.

if your referring to “General Recovery Advice” i would say in addition, knowing how to VERSION=0 and redo last step are both useful “magic commands”

Samr_small_pragsmall
06 Jan 2009, 22:33
Sam Ruby (634 posts)

Can we agree that described in full on page 299 and mentioned in passing prior to page 81 is sufficient?

I’m concerned that the “scorched earth” approach is over-covered, first on page 69, then again on 77, and finally on 299.

28555da_pragsmall
07 Jan 2009, 03:20
David Wilbur (49 posts)

well yes, i do think that reminders that on 299, there is a full description are all that are needed. i was thinking in the example on 81 that there was a great opportunity to introduce a new aspect of migrations, that of doing a redo. so yes, an in passing comment (aka footnote) “at this point it is worth mentioning that if you make a mistake here you can use redo to do an undo of the last change and then apply the corrected migration. (see page 299 for full description)” or something like that. at least that was what i was thinking…

You must be logged in to comment