# Does capistrano do migrations?

**URL:** <https://www.ruby-forum.com/t/does-capistrano-do-migrations/71151>\
**Category:** Rails\
**Created:** [October 5, 2006, 6:37pm UTC](https://www.ruby-forum.com/t/does-capistrano-do-migrations/71151 "2006-10-05T18:37:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ingoweiss](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/77aa72/32.png) [@ingoweiss](https://www.ruby-forum.com/u/ingoweiss)\
**Post date:** [October 5, 2006, 6:37pm UTC](https://www.ruby-forum.com/t/does-capistrano-do-migrations/71151/1 "2006-10-05T18:37:09Z")

</div>

Hi,

I am just beginning to use capistrano. When I run ‘rake deploy’, should  
Capistrano run migrations on the remote production database  
automatically? If no, can I configure it to do so? Or what is the best  
practices way of doing it? Currently, i am SSHing into my remote server  
after running ‘rake deploy’ and running the migrations manually.

Ingo

---

<div class="post-metadata">

**Author:** ![ingoweiss](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/77aa72/32.png) [@ingoweiss](https://www.ruby-forum.com/u/ingoweiss)\
**Post date:** [October 5, 2006, 6:45pm UTC](https://www.ruby-forum.com/t/does-capistrano-do-migrations/71151/2 "2006-10-05T18:45:12Z")

</div>

try:

rake remote:exec ACTION=“deploy\_with\_migrations”

On 10/5/06, Ingo W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> –  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> >

–  
Charles Brian Q.  
self-promotion: [www.seebq.com](http://www.seebq.com)  
highgroove studios: [www.highgroove.com](http://www.highgroove.com)  
slingshot hosting: [www.slingshothosting.com](http://www.slingshothosting.com)

---

<div class="post-metadata">

**Author:** ![ingoweiss](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/77aa72/32.png) [@ingoweiss](https://www.ruby-forum.com/u/ingoweiss)\
**Post date:** [October 5, 2006, 7:21pm UTC](https://www.ruby-forum.com/t/does-capistrano-do-migrations/71151/3 "2006-10-05T19:21:17Z")

</div>

Charles Brian Q. wrote:

> try:
> 
> rake remote:exec ACTION=“deploy\_with\_migrations”

Or just

rake remote:deploy\_with\_migrations

Chris

---

<div class="post-metadata">

**Author:** ![ingoweiss](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/77aa72/32.png) [@ingoweiss](https://www.ruby-forum.com/u/ingoweiss)\
**Post date:** [October 5, 2006, 6:45pm UTC](https://www.ruby-forum.com/t/does-capistrano-do-migrations/71151/4 "2006-10-05T18:45:13Z")

</div>

Ingo W. wrote:

> 

If you put the command “migrate” in your :after\_update\_code task in your  
deploy script, Capistrano will do a migrate for you.

Jamey

---

<div class="post-metadata">

**Author:** ![ingoweiss](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/77aa72/32.png) [@ingoweiss](https://www.ruby-forum.com/u/ingoweiss)\
**Post date:** [October 5, 2006, 11:03pm UTC](https://www.ruby-forum.com/t/does-capistrano-do-migrations/71151/5 "2006-10-05T23:03:30Z")

</div>

Thanks a lot for all the suggestions!

Ingo
