ruby - How do I do a SQLite to PostgreSQL migration? -


i have problem migrating sqlite3 database postgresql. how , need do?

i searching internet, find migrations mysql postgresql. can me?

i need convert sqlite database postgresql database heroku cloud hosting.

you don't want try binary conversion.

instead, rely on exporting data, importing it, or use query language of both , using selects , inserts.

i highly recommend @ sequel. it's great orm, makes switching between dbms easy.

read through opening page , you'll idea. follow reading through cheat sheet , rest of documentation , you'll see how easy , flexible use.

read migrations in sequel. they're akin migrations in rails, , make easy develop schema , maintain across various systems.

sequel makes easy open , read sqlite3 table, , concurrently open postgresql database , write it. instance, modified version of first 2 lines of "cheat sheet":

sqlite_db = sequel.sqlite('my_blog.db') pgsql_db = sequel.connect('postgres://user:password@localhost/my_db') 

base subsequent interactions either database using sqlite_db , pgsql_db , you'll on way porting data.

the author of sequel responsive , big fan of postgresql, orm has great integration features.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -