# Production Migration

**URL:** <https://www.ruby-forum.com/t/production-migration/202680>\
**Category:** Deployment\
**Created:** [February 3, 2011, 4:44pm UTC](https://www.ruby-forum.com/t/production-migration/202680 "2011-02-03T16:44:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [February 3, 2011, 4:44pm UTC](https://www.ruby-forum.com/t/production-migration/202680/1 "2011-02-03T16:44:19Z")

</div>

Hi

I’ve deployed my app to production running mysql 5.1.49-1ubuntu8.1

When running rake db:migrate RAILS\_ENV=production

I get the following output with no errors and nothing in the  
production.log

(in /home/ubuntu/apps/myapp/releases/20110203151404)  
\*\* Invoke db:migrate (first\_time)  
\*\* Invoke environment (first\_time)  
\*\* Execute environment  
\*\* Execute db:migrate  
\*\* Invoke db:schema:dump (first\_time)  
\*\* Invoke environment  
\*\* Execute db:schema:dump

rake db:create RAILS\_ENV=production created the database fine. I noticed  
after running the migration my schema.rb has been reverted to migration  
0

If anyone has any pointers on where to look or even if its config issue  
somewhere

Thanks  
Nath

ruby 1.9.2p136 (2010-12-25 revision 30365) [i686-linux]  
rails 3.0.3

GEMS  
gem ‘rails’, ‘3.0.3’  
gem ‘nifty-generators’  
gem ‘thinking-sphinx’  
gem ‘hpricot’  
gem “will\_paginate”, “~\> 3.0.pre2”  
gem “RedCloth”  
gem ‘mysql2’  
gem ‘jquery-rails’  
gem ‘delayed\_job’,:git =\>  
‘git://github.com/collectiveidea/delayed\_job.git’  
gem ‘slim\_scrooge’

## DB.yml

production:  
adapter: mysql2  
database: des  
username: root  
password:  
host: localhost

---

<div class="post-metadata">

**Author:** ![laserwhit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@laserwhit](https://www.ruby-forum.com/u/laserwhit)\
**Post date:** [April 3, 2011, 7:57am UTC](https://www.ruby-forum.com/t/production-migration/202680/2 "2011-04-03T07:57:47Z")

</div>

try

cap deploy:migrations

instead of cap deploy
