简体   繁体   English

heroku推送教程令人困惑

[英]heroku push tutorials confusing

When it comes to pushing databases,the problem starts for the amateurs. 在推送数据库时,业余爱好者会遇到问题。

i have my local mysql installed in windows 7,and referring to the heroku tutorial 我在Windows 7中安装了本地mysql,并参考了heroku教程

http://devcenter.heroku.com/articles/taps they say that you can specify heroku db:push 他们说您可以指定heroku db:push的http://devcenter.heroku.com/articles/taps

mysql://root:mypass@localhost/mydb in the command line My question is Do i have to include 命令行中的mysql:// root:mypass @ localhost / mydb我的问题是我是否必须包括

anything in my source code related with postgres? 我的源代码中与postgres相关的任何内容? thanks in advance 提前致谢

When on Heroku, unless you have specified otherwise, you'll be running on Postgres. 在Heroku上时,除非另行指定,否则将在Postgres上运行。 It you're using an ORM to access your database, then chances are you'll be OK. 如果您使用的是ORM来访问数据库,则可能会没事。

If not, then there are literally hundreds of differences between PG SQL and MySQL SQL so something will probably need tweaking depending on how complex your queries are. 如果不是这样,那么PG SQL和MySQL SQL之间实际上有数百个差异,因此可能需要根据查询的复杂程度进行调整。

Also, depending on the platform you're using you might need to include some dependencies for Postgres such as the pg gem for Ruby. 另外,根据您使用的平台,您可能需要包括Postgres的某些依赖项,例如Ruby的pg gem。

Something worth noting is that if you're using Rails, you can just do heroku db:push and Heroku does the rest for you ;) 值得注意的是,如果您使用的是Rails,则可以只做heroku db:push而Heroku可以为您完成其余工作;)

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

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