Forum: Ruby on Rails nuby migration question -- data migration, MySQL => postgres

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Warren S. (Guest)
on 2006-05-03 21:09
(Received via mailing list)
How do I best migrate the data?  For small databases I can text-edit the
dump file from
MySQL.  The postgresql compatibility switch doesn't help on mysqldump.
Any ideas.  Can
MySQL export CSV that postgresql can import ?

W Fred
Robby R. (Guest)
on 2006-05-03 21:10
(Received via mailing list)
On Apr 29, 2006, at 1:42 PM, Warren S. wrote:

> How do I best migrate the data?  For small databases I can text-
> edit the dump file from MySQL.  The postgresql compatibility switch
> doesn't help on mysqldump.  Any ideas.  Can MySQL export CSV that
> postgresql can import ?
>

Yes, PostgreSQL can import a CSV. :-)

I've also worked on a rake task in the past that would talk to a
MySQL db (Rails app) and then after I generate the PostgreSQL db with
the same schema (with the different field types)... I would just run
rake mysql2pgsql and it'd go through a yaml -> model -> save process.
It worked pretty well on a few projects.

Email me off list and I'll see what I can dig up this week for you.

-Robby


Robby R.
Founder & Executive Director

PLANET ARGON, LLC
Ruby on Rails Development, Consulting & Hosting

www.planetargon.com
www.robbyonrails.com

+1 503 445 2457
+1 877 55 ARGON [toll free]
+1 815 642 4968 [fax]
Robby R. (Guest)
on 2006-05-03 21:10
(Received via mailing list)
On Apr 29, 2006, at 6:53 PM, Robby R. wrote:

>
> I've also worked on a rake task in the past that would talk to a
> MySQL db (Rails app) and then after I generate the PostgreSQL db
> with the same schema (with the different field types)... I would
> just run rake mysql2pgsql and it'd go through a yaml -> model ->
> save process. It worked pretty well on a few projects.
>
> Email me off list and I'll see what I can dig up this week for you.

Also, there is this project:

http://gborg.postgresql.org/project/mysql2psql/pro...

Cheers,

Robby

Robby R.
Founder & Executive Director

PLANET ARGON, LLC
Ruby on Rails Development, Consulting & Hosting

www.planetargon.com
www.robbyonrails.com

+1 503 445 2457
+1 877 55 ARGON [toll free]
+1 815 642 4968 [fax]
This topic is locked and can not be replied to.