Change command on object to generate a migration instead of directly creating the tables #1

nielsm opened this Issue Feb 5, 2010 · 4 comments

4 participants


As currently implemented, deployments thru Capistrano are much harder as you have to manually go into the production environment & run the command. If the command instead generated the migration, it could be deployed exactly the same as before thru cap deploy:migrations.



This actually is possible, but not documented. You would simply put this line in a migration of your choosing:

ActsAsArchive.update Article, Comment

Of course you would replace "Article, Comment" with your models. I will update the README with this information and then close this ticket out.


winton, thanks for adding the docs for this. I figured out how to do this while hacking on the code, but I thought I'd need to add this functionality.


No problem at all. I can't think of a logical reason why we didn't deploy this using migrations, but there was a reason. We deployed a little under a year ago, so my memory fails me :)


I ran rake db:migrate as shown in the README but can't find any trace of these new tables. I came here and saw this, and tried it too, but it doesn't seem to work.

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