简体   繁体   English

在Heroku上迁移db:是否会改变生产数据库?

[英]Does a db:migrate on Heroku alter the production database?

I'm working with a small app on Heroku and I'm wondering if a heroku run rake db:migrate will affect the production database. 我正在使用Heroku上的一个小应用程序,我想知道heroku run rake db:migrate会影响生产数据库。 Any thoughts? 有什么想法吗?

I tried heroku db:pull but the pull stopped midway (not to mention that it screwed up my local db): 我尝试了heroku db:pull但拉动中途停止了(更不用说它搞砸了我的本地数据库):

Schema:         60% |====================================================================================                                                        | ETA:  00:00:16
Saving session to pull_201207010723.dat..
!!! Caught Server Exception
HTTP CODE: 503
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
    <head>
      <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
      <style type="text/css">
        html, body, iframe { margin: 0; padding: 0; height: 100%; }
        iframe { display: block; width: 100%; border: none; }
      </style>
    <title>Application Error</title></head>
    </head>
    <body>
      <iframe src="//s3.amazonaws.com/heroku_pages/error.html">
        <p>Application Error</p>
      </iframe>
    </body>
    </html>

Additional notes: local development db is sqlite3 and production db (by Heroku standard is postgresql). 附加说明:本地开发db是sqlite3和生产db(通过Heroku标准是postgresql)。 The devel db was like that by default and I couldn't find a nice tutorial to convert to postgresql. devel db默认是这样的,我找不到一个很好的教程来转换为postgresql。

Thanks a bunch! 谢谢你!

运行heroku run rake db:migrate确实会改变Heroku上的数据库 - 所以它会改变你的生产数据库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM