如何从SQLite迁移到PostgreSQL(Rails)

编程入门 行业动态 更新时间:2024-10-23 14:27:37
本文介绍了如何从SQLite迁移到PostgreSQL(Rails)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我遇到一些问题,通过点击宝石将我的SQLite数据库推送到Heroku。与他们交谈时,他们告诉我其中一种解决方案可能会将我的数据库从SQLite本地转换为PostgreSQL。 有没有简单的方法可以做到这一点?

谢谢

更多信息: - 来自Rails应用程序的数据库 - 我在Mac OS X上 - 通过macports安装PostgreSQL

解决方案

sqlite3 development.db .dump | psql dbname username

I'm a DB noob so please be kind with me.

I'm having some issues pushing my SQLite DB to Heroku via taps gem. Talking with them, they told me one of the solutions could be converting locally my DB from SQLite to PostgreSQL. Is there an easy way to do so?

Thanks

More info: - DB from Rails app - I'm on Mac OS X - Just installed PostgreSQL via macports

解决方案

sqlite3 development.db .dump | psql dbname username

更多推荐

如何从SQLite迁移到PostgreSQL(Rails)

本文发布于:2023-10-15 01:05:05,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1492786.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:SQLite   PostgreSQL   Rails

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!