How to convert a postgres database to sqlite

前端 未结 6 700
感动是毒
感动是毒 2020-12-01 16:51

We\'re working on a website, and when we develop locally (one of us from Windows), we use sqlite3, but on the server (linux) we use postgres. We\'d like to be able to impor

6条回答
  •  情深已故
    2020-12-01 17:03

    Taken from https://stackoverflow.com/a/31521432/1680728 (upvote there): The sequel gem makes this a very relaxing procedure:

    First install Ruby, then install the gem by running gem install sequel.

    In case of sqlite, it would be like this: sequel -C postgres://user@localhost/db sqlite://db/production.sqlite3

    Credits to @lulalala .

提交回复
热议问题