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
I found this blog entry which guides you to do these steps:
Create a dump of the PostgreSQL database.
ssh -C username@hostname.com pg_dump --data-only --inserts YOUR_DB_NAME > dump.sql
Remove/modify the dump.
SETSELECT pg_catalog.setvalt’f’Add BEGIN; as first line and END; as last line
Recreate an empty development database. bundle exec rake db:migrate
Import the dump.
sqlite3 db/development.sqlite3
sqlite> delete from schema_migrations;
sqlite> .read dump.sql
Of course connecting via ssh and creating a new db using rake are optional