Convert SQLITE SQL dump file to POSTGRESQL

后端 未结 8 545
梦如初夏
梦如初夏 2020-11-28 01:03

I\'ve been doing development using SQLITE database with production in POSTGRESQL. I just updated my local database with a huge amount of data and need to transfer a specifi

8条回答
  •  北海茫月
    2020-11-28 01:27

    The sequel gem (a Ruby library) offers data copying across different databases: http://sequel.jeremyevans.net/rdoc/files/doc/bin_sequel_rdoc.html#label-Copy+Databases

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

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

提交回复
热议问题